Struct olm_rs::utility::OlmUtility[][src]

pub struct OlmUtility { /* fields omitted */ }

Implementations

Allows you to make use of crytographic hashing via SHA-2 and verifying ed25519 signatures.

Creates a new instance of OlmUtility.

C-API equivalent

olm_utility

Returns a sha256 of the supplied byte slice.

C-API equivalent

olm_sha256

Panics

  • OUTPUT_BUFFER_TOO_SMALL for supplied output buffer
  • on malformed UTF-8 coding of the hash provided by libolm

Convenience function that converts the UTF-8 message to bytes and then calls sha256_bytes(), returning its output.

Verify a ed25519 signature.

Arugments

  • key - The public part of the ed25519 key that signed the message.
  • message - The message that was signed.
  • signature - The signature of the message.

C-API equivalent

olm_ed25519_verify

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.