pub struct KeyManagerSynchronousProxy { /* private fields */ }
Implementations§
Source§impl KeyManagerSynchronousProxy
impl KeyManagerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<KeyManagerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<KeyManagerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn seal_data(
&self,
plain_text: Buffer,
___deadline: MonotonicInstant,
) -> Result<KeyManagerSealDataResult, Error>
pub fn seal_data( &self, plain_text: Buffer, ___deadline: MonotonicInstant, ) -> Result<KeyManagerSealDataResult, Error>
Seal data to an encrypted form.
Seal data to an encrypted form. The sealed data can only be unsealed by the same KMS instance
by using UnsealData. plain_text
needs to be less than MAX_DATA_SIZE
bytes.
Sourcepub fn unseal_data(
&self,
cipher_text: Buffer,
___deadline: MonotonicInstant,
) -> Result<KeyManagerUnsealDataResult, Error>
pub fn unseal_data( &self, cipher_text: Buffer, ___deadline: MonotonicInstant, ) -> Result<KeyManagerUnsealDataResult, Error>
Unseal sealed data.
Unseal data previously sealed by this KMS instance.
Sourcepub fn generate_asymmetric_key(
&self,
key_name: &str,
key: ServerEnd<AsymmetricPrivateKeyMarker>,
___deadline: MonotonicInstant,
) -> Result<KeyManagerGenerateAsymmetricKeyResult, Error>
pub fn generate_asymmetric_key( &self, key_name: &str, key: ServerEnd<AsymmetricPrivateKeyMarker>, ___deadline: MonotonicInstant, ) -> Result<KeyManagerGenerateAsymmetricKeyResult, Error>
Generate an asymmetric key.
Generate an asymmetric key using key_name
as the unique name. key
is the generated
asymmetric key interface request. If the key_name
is not unique, you would get
KEY_ALREADY_EXISTS
. The generated key can be used to sign data. The algorithm used for
generating asymmetric key is ECDSA_SHA512_P521
.
Sourcepub fn generate_asymmetric_key_with_algorithm(
&self,
key_name: &str,
key_algorithm: AsymmetricKeyAlgorithm,
key: ServerEnd<AsymmetricPrivateKeyMarker>,
___deadline: MonotonicInstant,
) -> Result<KeyManagerGenerateAsymmetricKeyWithAlgorithmResult, Error>
pub fn generate_asymmetric_key_with_algorithm( &self, key_name: &str, key_algorithm: AsymmetricKeyAlgorithm, key: ServerEnd<AsymmetricPrivateKeyMarker>, ___deadline: MonotonicInstant, ) -> Result<KeyManagerGenerateAsymmetricKeyWithAlgorithmResult, Error>
Generate an asymmetric key with a specific algorithm.
Generate an asymmetric key using key_name
as the unique name and key_algorithm
as
algorithm. key
is the generated asymmetric key interface request. If the key_name
is not
unique, you would get KEY_ALREADY_EXISTS
.
Sourcepub fn import_asymmetric_private_key(
&self,
data: &[u8],
key_name: &str,
key_algorithm: AsymmetricKeyAlgorithm,
key: ServerEnd<AsymmetricPrivateKeyMarker>,
___deadline: MonotonicInstant,
) -> Result<KeyManagerImportAsymmetricPrivateKeyResult, Error>
pub fn import_asymmetric_private_key( &self, data: &[u8], key_name: &str, key_algorithm: AsymmetricKeyAlgorithm, key: ServerEnd<AsymmetricPrivateKeyMarker>, ___deadline: MonotonicInstant, ) -> Result<KeyManagerImportAsymmetricPrivateKeyResult, Error>
Import an asymmetric private key with a specific algorithm.
Import an asymmetric private key using key_name
as the unique name, key_algorithm
as
algorithm and data
as key data. key
is imported asymmetric key interface request. Key
data should be in asn.1 encoded DER format. If the key_name
is not unique, you would get
KEY_ALREADY_EXISTS
.
Sourcepub fn get_asymmetric_private_key(
&self,
key_name: &str,
key: ServerEnd<AsymmetricPrivateKeyMarker>,
___deadline: MonotonicInstant,
) -> Result<KeyManagerGetAsymmetricPrivateKeyResult, Error>
pub fn get_asymmetric_private_key( &self, key_name: &str, key: ServerEnd<AsymmetricPrivateKeyMarker>, ___deadline: MonotonicInstant, ) -> Result<KeyManagerGetAsymmetricPrivateKeyResult, Error>
Get an asymmetric private key handle.
Get an asymmetric private key handle using the key_name
. If such key is not found, would
return KEY_NOT_FOUND
.
Sourcepub fn delete_key(
&self,
key_name: &str,
___deadline: MonotonicInstant,
) -> Result<KeyManagerDeleteKeyResult, Error>
pub fn delete_key( &self, key_name: &str, ___deadline: MonotonicInstant, ) -> Result<KeyManagerDeleteKeyResult, Error>
Delete a key.
Delete a key for key_name
. For all the current handle to the deleted key, they would
become invalid and all following requests on those handles would return KEY_NOT_FOUND
, user
should close the invalid handles once get KEY_NOT_FOUND
error.
Trait Implementations§
Source§impl Debug for KeyManagerSynchronousProxy
impl Debug for KeyManagerSynchronousProxy
Source§impl SynchronousProxy for KeyManagerSynchronousProxy
impl SynchronousProxy for KeyManagerSynchronousProxy
Source§type Proxy = KeyManagerProxy
type Proxy = KeyManagerProxy
Source§type Protocol = KeyManagerMarker
type Protocol = KeyManagerMarker
Proxy
controls.