Struct message_verifier::AesHmacEncryptor
[−]
[src]
pub struct AesHmacEncryptor { /* fields omitted */ }
AesHmacEncryptor struct; similiar to ActiveSupport::MessageEncryptor
Methods
impl AesHmacEncryptor
[src]
fn new(
secret: &str,
salt: &str,
sign_salt: &str,
key_params: DerivedKeyParams
) -> Result<AesHmacEncryptor>
secret: &str,
salt: &str,
sign_salt: &str,
key_params: DerivedKeyParams
) -> Result<AesHmacEncryptor>
Create a new AesHmacEncryptor object
fn set_cipher_key_size(&mut self, key_size: KeySize) -> &mut AesHmacEncryptor
Set the cipher using the KeySize
enum
Trait Implementations
impl Encryptor for AesHmacEncryptor
[src]
fn decrypt_and_verify(&self, message: &str) -> Result<Vec<u8>>
Decrypt and verify a message generated by a compatible Encryptor. The message must first be verified before decryption is attempted.
fn encrypt_and_sign(&self, message: &str) -> Result<String>
Encrypt and sign a message from the input message. This message can be consumed by a compatible Encryptor