Enum ate::crypto::EncryptKey[][src]

pub enum EncryptKey {
    Aes128([u8; 16]),
    Aes192([u8; 24]),
    Aes256([u8; 32]),
}

Represents an encryption key that will give confidentiality to data stored within the redo-log. Note this does not give integrity which comes from the PrivateKey crypto instead.

Variants

Aes128([u8; 16])
Aes192([u8; 24])
Aes256([u8; 32])

Implementations

impl EncryptKey[src]

pub fn generate(size: KeySize) -> EncryptKey[src]

pub fn from_string(str: String, size: KeySize) -> EncryptKey[src]

👎 Deprecated since 0.2.1:

Please use ‘from_seed_string’ instead as this function only uses the first 30 bytes while the later uses all of the string as its entropy.

pub fn size(&self) -> KeySize[src]

pub fn value(&self) -> &[u8][src]

pub fn cipher(&self) -> Cipher[src]

pub fn encrypt_with_iv(
    &self,
    iv: &InitializationVector,
    data: &[u8]
) -> Result<Vec<u8>, ErrorStack>
[src]

pub fn encrypt(&self, data: &[u8]) -> Result<EncryptResult, Error>[src]

pub fn decrypt(
    &self,
    iv: &InitializationVector,
    data: &[u8]
) -> Result<Vec<u8>, Error>
[src]

pub fn as_bytes(&self) -> Vec<u8>[src]

pub fn from_bytes(bytes: &[u8]) -> Result<EncryptKey, Error>[src]

pub fn hash(&self) -> Hash[src]

pub fn from_seed_string(str: String, size: KeySize) -> EncryptKey[src]

pub fn from_seed_bytes(seed_bytes: &[u8], size: KeySize) -> EncryptKey[src]

pub fn xor(ek1: EncryptKey, ek2: EncryptKey) -> Result<EncryptKey, Error>[src]

Trait Implementations

impl Clone for EncryptKey[src]

impl Copy for EncryptKey[src]

impl Debug for EncryptKey[src]

impl Default for EncryptKey[src]

impl<'de> Deserialize<'de> for EncryptKey[src]

impl Display for EncryptKey[src]

impl Eq for EncryptKey[src]

impl Hash for EncryptKey[src]

impl PartialEq<EncryptKey> for EncryptKey[src]

impl Serialize for EncryptKey[src]

impl StructuralEq for EncryptKey[src]

impl StructuralPartialEq for EncryptKey[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CallHasher for T where
    T: Hash

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,