Struct argonautica::input::SecretKey[][src]

pub struct SecretKey<'a> { /* fields omitted */ }

Type-safe struct representing the raw bytes of a secret key

Methods

impl<'a> SecretKey<'a>
[src]

Constructs a SecretKey from a base64-encoded &str (or anything that can be dereferenced into a base64-encoded &str) using the standard base64 encoding.

Same as from_base64_encoded_str except you can pass a value that uses a non-standard base64 encoding (e.g. a url-safe encoding)

Read-only access to the underlying byte buffer

Indicates whether the underlying byte buffer is mutable or not. The underlying byte buffer is mutable when the SecretKey was constructed from an owned value (such as a String or a Vec<u8>) or from a mutable reference (such as a &mut str or a &mut [u8]). It is not mutable when the SecretKey was constructed from an immutable reference (such as a &str or a &[u8]). The SecretKey must be mutable in order to hash or verify with the secret_key_clearing configuration set to true

Read-only acccess to the underlying byte buffer's length (in number of bytes)

Clones the underlying byte buffer and returns a new SecretKey with a static lifetime. Use this method if you would like to move a SecretKey to another thread

Returns the underlying byte buffer as a base64-encoded String using standard base64 encoding

Returns the underlying byte buffer as a base64-encoded String using a custom base64 encoding (e.g. a url-safe encoding)

Read-only access to the underlying byte buffer as a &str if its bytes are valid utf-8

Trait Implementations

impl<'a> From<&'a str> for SecretKey<'a>
[src]

Performs the conversion.

impl<'a> From<&'a mut str> for SecretKey<'a>
[src]

Performs the conversion.

impl<'a> From<&'a String> for SecretKey<'a>
[src]

Performs the conversion.

impl<'a> From<&'a mut String> for SecretKey<'a>
[src]

Performs the conversion.

impl<'a> From<String> for SecretKey<'a>
[src]

Performs the conversion.

impl<'a> From<&'a [u8]> for SecretKey<'a>
[src]

Performs the conversion.

impl<'a> From<&'a mut [u8]> for SecretKey<'a>
[src]

Performs the conversion.

impl<'a> From<&'a Vec<u8>> for SecretKey<'a>
[src]

Performs the conversion.

impl<'a> From<&'a mut Vec<u8>> for SecretKey<'a>
[src]

Performs the conversion.

impl<'a> From<Vec<u8>> for SecretKey<'a>
[src]

Performs the conversion.

impl<'a> From<&'a SecretKey<'a>> for SecretKey<'a>
[src]

Performs the conversion.

impl<'a> From<&'a mut SecretKey<'a>> for SecretKey<'a>
[src]

Performs the conversion.

impl<'a> Debug for SecretKey<'a>
[src]

Formats the value using the given formatter. Read more

impl<'a> Eq for SecretKey<'a>
[src]

impl<'a> PartialEq for SecretKey<'a>
[src]

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

This method tests for !=.

impl<'a> Hash for SecretKey<'a>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl<'a> Send for SecretKey<'a>

impl<'a> Sync for SecretKey<'a>