pub struct EcSigner(/* private fields */);Implementations§
Source§impl EcSigner
impl EcSigner
pub fn new(cipher_suite: CipherSuite) -> Option<Self>
pub fn new_from_curve(curve: Curve) -> Self
pub fn signature_key_generate( &self, ) -> Result<(SignatureSecretKey, SignaturePublicKey), EcSignerError>
pub fn signature_key_derive_public( &self, secret_key: &SignatureSecretKey, ) -> Result<SignaturePublicKey, EcSignerError>
pub fn sign( &self, secret_key: &SignatureSecretKey, data: &[u8], ) -> Result<Vec<u8>, EcSignerError>
pub fn verify( &self, public_key: &SignaturePublicKey, signature: &[u8], data: &[u8], ) -> Result<(), EcSignerError>
Methods from Deref<Target = Curve>§
Sourcepub fn secret_key_size(&self) -> usize
pub fn secret_key_size(&self) -> usize
Returns the amount of bytes of a secret key using this curve
pub fn public_key_size(&self) -> usize
pub fn hpke_sampling_method(&self) -> SamplingMethod
Trait Implementations§
impl Copy for EcSigner
impl Eq for EcSigner
impl StructuralPartialEq for EcSigner
Auto Trait Implementations§
impl Freeze for EcSigner
impl RefUnwindSafe for EcSigner
impl Send for EcSigner
impl Sync for EcSigner
impl Unpin for EcSigner
impl UnwindSafe for EcSigner
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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