pub struct XtsAes256(/* private fields */);
Expand description
XTS-AES-256 encryption/decryption.
Implementations§
Source§impl XtsAes256
impl XtsAes256
Sourcepub const KEY_LEN: usize = 64usize
pub const KEY_LEN: usize = 64usize
The required key length for the algorithm.
Note that an XTS-AES-256 key contains two AES keys, each of which is 256 bits.
Sourcepub fn new(key: &[u8; 64], data_unit_size: u32) -> Result<Self, Error>
pub fn new(key: &[u8; 64], data_unit_size: u32) -> Result<Self, Error>
Creates a new XTS-AES-256 encryption/decryption context.
Sourcepub fn encrypt(&self) -> Result<XtsAes256Ctx<'_>, Error>
pub fn encrypt(&self) -> Result<XtsAes256Ctx<'_>, Error>
Returns a context for encrypting data.
Sourcepub fn decrypt(&self) -> Result<XtsAes256Ctx<'_>, Error>
pub fn decrypt(&self) -> Result<XtsAes256Ctx<'_>, Error>
Returns a context for decrypting data.
Auto Trait Implementations§
impl Freeze for XtsAes256
impl RefUnwindSafe for XtsAes256
impl Send for XtsAes256
impl Sync for XtsAes256
impl Unpin for XtsAes256
impl UnwindSafe for XtsAes256
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more