pub struct SigningKey { /* private fields */ }Expand description
A private key. sign is one-shot on the immutable key, mirroring
mac-key.sign. The extractability contract in README.md applies.
Implementations§
Source§impl SigningKey
impl SigningKey
Source§impl SigningKey
impl SigningKey
Sourcepub fn algorithm_name(&self) -> String
pub fn algorithm_name(&self) -> String
See verifying-key.algorithm-name.
Source§impl SigningKey
impl SigningKey
Sourcepub fn algorithm_curve(&self) -> Option<String>
pub fn algorithm_curve(&self) -> Option<String>
See verifying-key.algorithm-curve.
Source§impl SigningKey
impl SigningKey
Sourcepub fn algorithm_hash(&self) -> Option<String>
pub fn algorithm_hash(&self) -> Option<String>
See verifying-key.algorithm-hash.
Source§impl SigningKey
impl SigningKey
Sourcepub fn algorithm_length(&self) -> Option<u32>
pub fn algorithm_length(&self) -> Option<u32>
See verifying-key.algorithm-length.
Source§impl SigningKey
impl SigningKey
Sourcepub fn algorithm_public_exponent(&self) -> Option<Vec<u8>>
pub fn algorithm_public_exponent(&self) -> Option<Vec<u8>>
See verifying-key.algorithm-public-exponent.
Source§impl SigningKey
impl SigningKey
Sourcepub fn extractable(&self) -> bool
pub fn extractable(&self) -> bool
Whether the export functions may return this key’s material. Mint-time recorded policy, which platform-backed key storage also honors.
Source§impl SigningKey
impl SigningKey
Source§impl SigningKey
impl SigningKey
Sourcepub async fn export_key_jwk(&self) -> Result<String, Error>
pub async fn export_key_jwk(&self) -> Result<String, Error>
The private key as a JWK (an RFC 8037 OKP private key for
Ed25519, an EC private key for ECDSA). Fails
error.not-extractable unless the key was minted extractable;
fallible beyond the gate like every export (README.md,
“Extractability”). See mac-key.export-key-jwk for the
package-wide JWK contract.
Source§impl SigningKey
impl SigningKey
Source§impl SigningKey
impl SigningKey
Sourcepub async fn to_wrap_input_jwk(&self) -> Result<WrapInput, Error>
pub async fn to_wrap_input_jwk(&self) -> Result<WrapInput, Error>
The private-key JWK serialization as a wrap-input, for
wrapping under another key (see the wrapping interface).
Behind the same extractability gate as export-key-jwk, and
fallible beyond it like every export; the material itself
never reaches the caller.
Source§impl SigningKey
impl SigningKey
Sourcepub async fn to_wrap_input_pkcs8(&self) -> Result<WrapInput, Error>
pub async fn to_wrap_input_pkcs8(&self) -> Result<WrapInput, Error>
The PKCS#8 serialization as a wrap-input, behind the same
gate.