Struct GeneralPurpose
struct GeneralPurpose { ... }
A general-purpose base64 engine.
- It uses no vector CPU instructions, so it will work on any system.
- It is reasonably fast (~2-3GiB/s).
- It is not constant-time, though, so it is vulnerable to timing side-channel attacks. For loading cryptographic keys, etc, it is suggested to use the forthcoming constant-time implementation.
Implementations
impl GeneralPurpose
const fn new(alphabet: &Alphabet, config: GeneralPurposeConfig) -> SelfCreate a
GeneralPurposeengine from an [Alphabet].While not very expensive to initialize, ideally these should be cached if the engine will be used repeatedly.
impl Clone for GeneralPurpose
fn clone(self: &Self) -> GeneralPurpose
impl Debug for GeneralPurpose
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Engine for GeneralPurpose
fn config(self: &Self) -> &<Self as >::Config
impl Freeze for GeneralPurpose
impl RefUnwindSafe for GeneralPurpose
impl Send for GeneralPurpose
impl Sync for GeneralPurpose
impl Unpin for GeneralPurpose
impl UnwindSafe for GeneralPurpose
impl<T> Any for GeneralPurpose
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for GeneralPurpose
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for GeneralPurpose
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for GeneralPurpose
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for GeneralPurpose
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for GeneralPurpose
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for GeneralPurpose
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for GeneralPurpose
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for GeneralPurpose
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>