Struct const_decoder::Pem [−][src]
Decoder for the PEM file format (Base64 with additional header / trailer lines).
Examples
// X.25519 private key generated using OpenSSL: // `openssl genpkey -algorithm X25519`. const PRIVATE_KEY: [u8; 48] = Pem::parse( b"-----BEGIN PRIVATE KEY----- MC4CAQAwBQYDK2VuBCIEINAOV4yAyaoM2wmJPApQs3byDhw7oJRG47V0VHwGnctD -----END PRIVATE KEY-----", );
Implementations
impl Pem
[src]
pub const fn parse<const N: usize>(input: &[u8]) -> [u8; N]
[src]
Decodes input
into a byte array.
Panics
- Panics if the provided length is insufficient or too large for
input
. - Panics if
input
contains invalid chars.
Trait Implementations
impl Clone for Pem
[src]
fn clone(&self) -> Pem
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Pem
[src]
impl Debug for Pem
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,