pub struct SigningKey { /* private fields */ }Implementations§
Source§impl SigningKey
impl SigningKey
Sourcepub fn from_ed25519_pem(
pem: &[u8],
kid: impl Into<String>,
) -> Result<Self, IssueError>
pub fn from_ed25519_pem( pem: &[u8], kid: impl Into<String>, ) -> Result<Self, IssueError>
Parse an Ed25519 private key from PEM and pair it with the given
kid. Returns KeyParse on any decode failure — the variant
name is the audit signal; the wrapped string carries the
library’s diagnostic for incident response.
Sourcepub fn test_pair() -> (Self, KeySet)
pub fn test_pair() -> (Self, KeySet)
Test-only constructor — returns a (SigningKey, KeySet) pair
where the KeySet already carries the matching decoding key under
the same kid. Round-trip integration tests rely on this contract:
issue with the signing half and verify against the key set
must agree without manual wiring.
The PEM constants are deterministic across runs (checked-in test
material; same key as tests/jwt_negative.rs::TEST_PRIVATE_KEY_PEM),
so failures are reproducible. The private key has no production
value.
Auto Trait Implementations§
impl Freeze for SigningKey
impl RefUnwindSafe for SigningKey
impl Send for SigningKey
impl Sync for SigningKey
impl Unpin for SigningKey
impl UnsafeUnpin for SigningKey
impl UnwindSafe for SigningKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more