pub trait Signer {
type Error;
// Required methods
fn platform(&self) -> Platform;
fn sign(&self, client_data_hash: &[u8; 32]) -> Result<Vec<u8>, Self::Error>;
}Expand description
Signs with an attested device key.
Hardware signers block, so call sign_request off any async executor.
Required Associated Types§
Required Methods§
Sourcefn platform(&self) -> Platform
fn platform(&self) -> Platform
The platform whose signature encoding Signer::sign produces.
Sourcefn sign(&self, client_data_hash: &[u8; 32]) -> Result<Vec<u8>, Self::Error>
fn sign(&self, client_data_hash: &[u8; 32]) -> Result<Vec<u8>, Self::Error>
Signs client_data_hash, the SHA-256 of the signature base, and returns the platform
encoding: DER-encoded ECDSA on Android, a CBOR App Attest assertion on iOS.
§Errors
Returns the signer’s error when the key cannot sign.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".