pub struct SigningKey { /* private fields */ }Expand description
An Ed25519 signing key, stored as its 32-byte seed in hex.
The seed file is the only secret of the scheme; it belongs on the issuing server, never into a repository.
Implementations§
Source§impl SigningKey
impl SigningKey
Sourcepub fn generate() -> Result<Self, LicenceError>
pub fn generate() -> Result<Self, LicenceError>
Generate a new random key.
Sourcepub fn from_seed_hex(hex: &str) -> Result<Self, LicenceError>
pub fn from_seed_hex(hex: &str) -> Result<Self, LicenceError>
Load from a hex seed (64 hex digits).
Sourcepub fn public_hex(&self) -> String
pub fn public_hex(&self) -> String
Raw public key as hex.
Sourcepub fn sign(&self, payload: &LicencePayload) -> Result<String, LicenceError>
pub fn sign(&self, payload: &LicencePayload) -> Result<String, LicenceError>
Sign a payload into a text block. payload.kid must be this key’s id.
Auto Trait Implementations§
impl Freeze for SigningKey
impl RefUnwindSafe for SigningKey
impl Send for SigningKey
impl Sync for SigningKey
impl Unpin 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