From 6c7b133db5ad617fd7ef63df6a4d15156c9119bc Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Fri, 25 Jan 2019 00:34:26 +0800 Subject: [PATCH] Built with miscreant 0.4.2 --- src/crypto/siv.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/crypto/siv.rs b/src/crypto/siv.rs index b9c10593..08798cca 100644 --- a/src/crypto/siv.rs +++ b/src/crypto/siv.rs @@ -2,7 +2,7 @@ use std::ptr; -use miscreant::aead::{Aes128PmacSiv, Aes256PmacSiv, Algorithm}; +use miscreant::aead::{Aes128PmacSivAead, Aes256PmacSivAead, Aead}; use crate::crypto::{ aead::{increase_nonce, make_skey}, @@ -19,8 +19,8 @@ use byte_string::ByteStr; /// AEAD ciphers provided by Miscreant pub enum MiscreantCryptoVariant { - Aes128(Aes128PmacSiv), - Aes256(Aes256PmacSiv), + Aes128(Aes128PmacSivAead), + Aes256(Aes256PmacSivAead), } /// AEAD Cipher context @@ -58,12 +58,12 @@ impl MiscreantCipher { CipherType::Aes128PmacSiv => { let mut skey = [0; 32]; skey.copy_from_slice(key); - MiscreantCryptoVariant::Aes128(Aes128PmacSiv::new(&skey)) + MiscreantCryptoVariant::Aes128(Aes128PmacSivAead::new(&skey)) } CipherType::Aes256PmacSiv => { let mut skey = [0; 64]; skey.copy_from_slice(key); - MiscreantCryptoVariant::Aes256(Aes256PmacSiv::new(&skey)) + MiscreantCryptoVariant::Aes256(Aes256PmacSivAead::new(&skey)) } _ => panic!("unsupported cipher in miscreant {:?}", t), }