pub struct SecretEncoder<'a> { /* private fields */ }Expand description
Incremental secret encoder over caller-provided protected output storage.
Implementations§
Source§impl<'a> SecretEncoder<'a>
impl<'a> SecretEncoder<'a>
Sourcepub fn new<S: Codec>(
codec: &Base64<S>,
maximum_input_len: usize,
output: &'a mut [u8],
) -> Result<Self, SecretEncodeError>
pub fn new<S: Codec>( codec: &Base64<S>, maximum_input_len: usize, output: &'a mut [u8], ) -> Result<Self, SecretEncodeError>
Binds one complete protected output range before accepting input.
Sourcepub fn update(
&mut self,
input: &SecretInput<'_>,
) -> Result<Progress, SecretEncodeError>
pub fn update( &mut self, input: &SecretInput<'_>, ) -> Result<Progress, SecretEncodeError>
Encodes one classified chunk into the protected output range.
Sourcepub fn finish(self) -> Result<SecretOutput<'a>, SecretEncodeError>
pub fn finish(self) -> Result<SecretOutput<'a>, SecretEncodeError>
Completes encoding and returns a wiping borrowed output guard.
Sourcepub const fn state(&self) -> &SecretEncoderState
pub const fn state(&self) -> &SecretEncoderState
Returns public encoder metadata without exposing output bytes.
Trait Implementations§
Source§impl Debug for SecretEncoder<'_>
impl Debug for SecretEncoder<'_>
Source§impl Drop for SecretEncoder<'_>
impl Drop for SecretEncoder<'_>
Auto Trait Implementations§
impl<'a> !UnwindSafe for SecretEncoder<'a>
impl<'a> Freeze for SecretEncoder<'a>
impl<'a> RefUnwindSafe for SecretEncoder<'a>
impl<'a> Send for SecretEncoder<'a>
impl<'a> Sync for SecretEncoder<'a>
impl<'a> Unpin for SecretEncoder<'a>
impl<'a> UnsafeUnpin for SecretEncoder<'a>
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