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

Method from_ed_components

src/decoding.rs:204–210  ·  view source on GitHub ↗

From x part (base64 encoded) of the JWK encoding

(x: &str)

Source from the content-addressed store, hash-verified

202
203 /// From x part (base64 encoded) of the JWK encoding
204 pub fn from_ed_components(x: &str) -> Result<Self> {
205 let x_decoded = b64_decode(x)?;
206 Ok(DecodingKey {
207 family: AlgorithmFamily::Ed,
208 kind: DecodingKeyKind::SecretOrDer(x_decoded),
209 })
210 }
211
212 /// If you have a key in Jwk format
213 pub fn from_jwk(jwk: &Jwk) -> Result<Self> {

Callers

nothing calls this directly

Calls 1

b64_decodeFunction · 0.85

Tested by

no test coverage detected