pub struct Encryptor<N: Network> { /* private fields */ }
Expand description
Tool for encrypting and decrypting Aleo key material into ciphertext
Implementations§
Source§impl<N: Network> Encryptor<N>
impl<N: Network> Encryptor<N>
Sourcepub fn encrypt_private_key_with_secret(
private_key: &PrivateKey<N>,
secret: &str,
) -> Result<Ciphertext<N>>
pub fn encrypt_private_key_with_secret( private_key: &PrivateKey<N>, secret: &str, ) -> Result<Ciphertext<N>>
Encrypt a private key into ciphertext using a secret
Sourcepub fn decrypt_private_key_with_secret(
ciphertext: &Ciphertext<N>,
secret: &str,
) -> Result<PrivateKey<N>>
pub fn decrypt_private_key_with_secret( ciphertext: &Ciphertext<N>, secret: &str, ) -> Result<PrivateKey<N>>
Decrypt a private key from ciphertext using a secret
Auto Trait Implementations§
impl<N> Freeze for Encryptor<N>
impl<N> RefUnwindSafe for Encryptor<N>where
N: RefUnwindSafe,
impl<N> Send for Encryptor<N>
impl<N> Sync for Encryptor<N>
impl<N> Unpin for Encryptor<N>where
N: Unpin,
impl<N> UnwindSafe for Encryptor<N>where
N: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more