Trait EncryptedSecretKey

Source
pub trait EncryptedSecretKey {
    const ENCRYPTION_DATA_VERSION_BYTE: u8 = 2u8;
    const SECRET_KEY_PREFIX_BYTE: u8 = 1u8;
    const BOX_PRIMITIVE: &'static str = "xsalsa20poly1305";
    const PW_PRIMITIVE: &'static str = "argon2i";
    const PW_DIFF: (u32, u32) = _;

    // Provided methods
    fn try_decrypt(
        encrypted: &EncryptedSecretKeyFile,
        password: &str,
    ) -> Result<Vec<u8>, EncryptionError> { ... }
    fn try_encrypt(
        key: &[u8],
        password: &str,
    ) -> Result<EncryptedSecretKeyFile, EncryptionError> { ... }
}

Provided Associated Constants§

Source

const ENCRYPTION_DATA_VERSION_BYTE: u8 = 2u8

Source

const SECRET_KEY_PREFIX_BYTE: u8 = 1u8

Source

const BOX_PRIMITIVE: &'static str = "xsalsa20poly1305"

Source

const PW_PRIMITIVE: &'static str = "argon2i"

Source

const PW_DIFF: (u32, u32) = _

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§