Struct safe_crypto::SecretId[][src]

pub struct SecretId { /* fields omitted */ }

Secret counterpart of the public identity, consisting of a secret signing key and a secret encryption key.

Methods

impl SecretId
[src]

Generates a pair of secret and public key sets.

Returns the public part of the secret key set.

Decrypts serialised ciphertext encrypted using anonymous encryption.

With anonymous encryption we won't be able to verify the sender and tell who sent the ciphertext.

Returns deserialised type T in case of success. Can return EncryptionError in case of a deserialisation error, if the ciphertext is not valid, or if it can not be decrypted.

Decrypts bytestring ciphertext encrypted using anonymous encryption.

With anonymous encryption we won't be able to verify the sender and tell who sent the ciphertext.

Returns plaintext in case of success. Can return EncryptionError if the ciphertext is not valid or if it can not be decrypted.

Produces the detached signature from the data.

Afterwards the returned Signature can be used to verify the authenticity of data.

Computes a shared secret from our secret key and the recipient's public key.

Trait Implementations

impl Debug for SecretId
[src]

Formats the value using the given formatter. Read more

impl PartialEq for SecretId
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for SecretId
[src]

impl Clone for SecretId
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for SecretId
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for SecretId

impl Sync for SecretId