MCPcopy Create free account
hub / github.com/Keats/jsonwebtoken / from_ed_pem

Method from_ed_pem

src/decoding.rs:170–177  ·  view source on GitHub ↗
(key: &[u8])

Source from the content-addressed store, hash-verified

168 /// Note: Ed448 keys are not supported
169 #[cfg(feature = "use_pem")]
170 pub fn from_ed_pem(key: &[u8]) -> Result<Self> {
171 let pem_key = PemEncodedKey::new(key)?;
172 let content = pem_key.as_ed_public_key()?;
173 Ok(DecodingKey {
174 family: AlgorithmFamily::Ed,
175 kind: DecodingKeyKind::SecretOrDer(content.to_vec()),
176 })
177 }
178
179 /// If you know what you're doing and have a RSA DER encoded public key, use this.
180 pub fn from_rsa_der(der: &[u8]) -> Self {

Callers

nothing calls this directly

Calls 1

as_ed_public_keyMethod · 0.80

Tested by

no test coverage detected