pub struct SigningKey(/* private fields */);Expand description
A signature.signing-key: private-key signing.
Implementations§
Source§impl SigningKey
impl SigningKey
Sourcepub fn from_raw(raw: SigningKey) -> Self
pub fn from_raw(raw: SigningKey) -> Self
Wrap a raw signing-key resource.
Sourcepub fn as_raw(&self) -> &SigningKey
pub fn as_raw(&self) -> &SigningKey
Borrow the raw signing-key resource.
Sourcepub fn into_raw(self) -> SigningKey
pub fn into_raw(self) -> SigningKey
Unwrap into the raw signing-key resource.
Source§impl SigningKey
impl SigningKey
Sourcepub async fn sign(
&self,
data: impl Into<DataSource<'_>>,
) -> Result<Vec<u8>, Error>
pub async fn sign( &self, data: impl Into<DataSource<'_>>, ) -> Result<Vec<u8>, Error>
Sign data, returning the signature in the minting interface’s
documented wire format.
Fails only for operational reasons (Error::Other, or
Error::Read for a failing DataSource::from_reader source) —
never for misuse, which is unrepresentable.
Sourcepub fn algorithm_name(&self) -> String
pub fn algorithm_name(&self) -> String
Sourcepub fn algorithm_curve(&self) -> Option<String>
pub fn algorithm_curve(&self) -> Option<String>
Sourcepub fn algorithm_hash(&self) -> Option<String>
pub fn algorithm_hash(&self) -> Option<String>
Sourcepub fn algorithm_length(&self) -> Option<u32>
pub fn algorithm_length(&self) -> Option<u32>
Sourcepub fn algorithm_public_exponent(&self) -> Option<Vec<u8>>
pub fn algorithm_public_exponent(&self) -> Option<Vec<u8>>
Sourcepub fn extractable(&self) -> bool
pub fn extractable(&self) -> bool
Whether the private key material may be exported. There is
currently no export operation — extractability is mint-time
recorded policy that future format-specific exports and
platform-backed key storage honor (see the WIT
signing-key.extractable doc).
Sourcepub fn can_sign(&self) -> bool
pub fn can_sign(&self) -> bool
Whether the key permits sign — the usage recorded
at mint (or carried by a platform keystore key). A refused
operation fails Error::NotPermitted.