pub struct Rustcrypt { /* private fields */ }Implementations§
Source§impl Rustcrypt
impl Rustcrypt
pub fn new(option: Option<&[u8]>) -> Result<Self, RustcryptError>
pub fn with_config( key_option: Option<&[u8]>, layers: EncryptionLayers, use_ephemeral: bool, ) -> Result<Self, RustcryptError>
pub fn with_hardware_key( layers: EncryptionLayers, ) -> Result<Self, RustcryptError>
pub fn hide(&self, input: &str) -> Result<Vec<u8>, RustcryptError>
pub fn hide_bytes(&self, input: &[u8]) -> Result<Vec<u8>, RustcryptError>
pub fn reveal(&self, input: &[u8]) -> Result<String, RustcryptError>
pub fn reveal_bytes( &self, input: &[u8], ) -> Result<Zeroizing<Vec<u8>>, RustcryptError>
pub fn hide_stack<const N: usize>( &self, input: &[u8], ) -> Result<StackSecret<N>, RustcryptError>
pub fn layers(&self) -> EncryptionLayers
pub fn is_ephemeral(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rustcrypt
impl RefUnwindSafe for Rustcrypt
impl Send for Rustcrypt
impl Sync for Rustcrypt
impl Unpin for Rustcrypt
impl UnwindSafe for Rustcrypt
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