Struct olm_rs::sas::OlmSas[][src]

pub struct OlmSas { /* fields omitted */ }

Implementations

Get the public key for the SAS object.

This returns the public key of the SAS object that can then be shared with another user to perform the authentication process.

Set the public key of the other user.

This sets the public key of the other user, it needs to be set before bytes can be generated for the authentication string and a MAC can be calculated.

Returns an error if the public key was too short or invalid.

Arguments

  • public_key - The public key of the other user.

Generate bytes to use for the short authentication string.

Note the other public key needs to be set for this method to work. Returns an error if it isn’t set.

Arguments

  • extra_info - Extra information to mix in when generating the bytes.

  • length - The number of bytes to generate.

Generate a message authentication code based on the shared secret.

Note the other public key needs to be set for this method to work. Returns an error if it isn’t set.

Arguments

  • message - The message to produce the authentication code for.

  • extra_info - Extra information to mix in when generating the MAC.

Trait Implementations

Returns the “default value” for a type. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.