Struct GeneralPurpose
pub struct GeneralPurpose { /* private fields */ }
A general-purpose base64 engine.
- It uses no vector CPU instructions, so it will work on any system. For a version that uses
SIMD where available, see the SIMD engines behind the
simd-unsafefeature. - 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.
Trait Implementations
impl Clone for GeneralPurpose
fn clone(&self) -> Self
impl Debug for GeneralPurpose
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Engine for GeneralPurpose
type Config = GeneralPurposeConfig;type DecodeEstimate = GeneralPurposeEstimate;fn config(&self) -> &Self::Configfn padding(&self) -> Symbol