Trait encryption_export::Backend [−][src]
Provide API to encrypt/decrypt key dictionary content.
Can be back by KMS, or a key read from a file. If file is used, it will prefix the result with the IV (nonce + initial counter) on encrypt, and decode the IV on decrypt.
Required methods
pub fn encrypt(&self, plaintext: &[u8]) -> Result<EncryptedContent, Error>
[src]
pub fn decrypt(
&self,
ciphertext: &EncryptedContent
) -> Result<Vec<u8, Global>, Error>
[src]
&self,
ciphertext: &EncryptedContent
) -> Result<Vec<u8, Global>, Error>
pub fn is_secure(&self) -> bool
[src]
Tests whether this backend is secure.
Implementations on Foreign Types
impl Backend for PlaintextBackend
[src]
pub fn encrypt(&self, plaintext: &[u8]) -> Result<EncryptedContent, Error>
[src]
pub fn decrypt(
&self,
ciphertext: &EncryptedContent
) -> Result<Vec<u8, Global>, Error>
[src]
&self,
ciphertext: &EncryptedContent
) -> Result<Vec<u8, Global>, Error>
pub fn is_secure(&self) -> bool
[src]
impl Backend for FileBackend
[src]
pub fn encrypt(&self, plaintext: &[u8]) -> Result<EncryptedContent, Error>
[src]
pub fn decrypt(
&self,
content: &EncryptedContent
) -> Result<Vec<u8, Global>, Error>
[src]
&self,
content: &EncryptedContent
) -> Result<Vec<u8, Global>, Error>