pub struct SignatureEngine { /* private fields */ }Expand description
Signature engine for digital signatures
Implementations§
Source§impl SignatureEngine
impl SignatureEngine
pub fn new() -> Self
pub fn initialize(&mut self) -> Result<(), CryptographicError>
Sourcepub fn add_signing_algorithm(&mut self, algorithm: SigningAlgorithm)
pub fn add_signing_algorithm(&mut self, algorithm: SigningAlgorithm)
Register a signing algorithm configuration.
Sourcepub fn get_signing_algorithm(
&self,
algorithm: &KeyAlgorithm,
) -> Option<&SigningAlgorithm>
pub fn get_signing_algorithm( &self, algorithm: &KeyAlgorithm, ) -> Option<&SigningAlgorithm>
Look up a signing algorithm by key algorithm.
Sourcepub fn list_signing_algorithms(&self) -> impl Iterator<Item = &SigningAlgorithm>
pub fn list_signing_algorithms(&self) -> impl Iterator<Item = &SigningAlgorithm>
Iterate over all registered signing algorithms.
Sourcepub fn add_verification_algorithm(
&mut self,
key_algorithm: KeyAlgorithm,
algorithm: VerificationAlgorithm,
)
pub fn add_verification_algorithm( &mut self, key_algorithm: KeyAlgorithm, algorithm: VerificationAlgorithm, )
Register a verification algorithm configuration.
Sourcepub fn get_verification_algorithm(
&self,
algorithm: &KeyAlgorithm,
) -> Option<&VerificationAlgorithm>
pub fn get_verification_algorithm( &self, algorithm: &KeyAlgorithm, ) -> Option<&VerificationAlgorithm>
Look up a verification algorithm by key algorithm.
Sourcepub fn list_verification_algorithms(
&self,
) -> impl Iterator<Item = &VerificationAlgorithm>
pub fn list_verification_algorithms( &self, ) -> impl Iterator<Item = &VerificationAlgorithm>
Iterate over all registered verification algorithms.
pub fn sign_data( &mut self, private_key: &Key, data: &[u8], ) -> Result<Signature, CryptographicError>
pub fn verify_signature( &mut self, public_key: &Key, signature: &Signature, data: &[u8], ) -> Result<bool, CryptographicError>
Auto Trait Implementations§
impl Freeze for SignatureEngine
impl RefUnwindSafe for SignatureEngine
impl Send for SignatureEngine
impl Sync for SignatureEngine
impl Unpin for SignatureEngine
impl UnsafeUnpin for SignatureEngine
impl UnwindSafe for SignatureEngine
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more