Skip to main content

decode_public_key

Function decode_public_key 

Source
pub fn decode_public_key(value: &str) -> Result<VerifyingKey, ComponentError>
Expand description

Decode an Ed25519 public key from PEM, or from base64-encoded (standard or unpadded) raw 32-byte / DER SubjectPublicKeyInfo bytes.

Standard and unpadded base64 are both accepted because config authors, signing tooling, and hand-copied keys are not consistent about padding, and a key that validates under one variant but not the other is a config that silently breaks at load time.