pub struct Signature { /* private fields */ }Available on crate feature
dsa only.Expand description
BignP256 Signature.
Implementations§
Source§impl Signature
impl Signature
Sourcepub fn from_bytes(bytes: &SignatureBytes) -> Result<Self>
pub fn from_bytes(bytes: &SignatureBytes) -> Result<Self>
Parse an BignP256 signature from a byte array.
Sourcepub fn from_slice(bytes: &[u8]) -> Result<Self>
pub fn from_slice(bytes: &[u8]) -> Result<Self>
Parse an BignP256 signature from a byte slice.
Sourcepub fn from_scalars(
s0: impl Into<FieldBytes>,
s1: impl Into<FieldBytes>,
) -> Result<Self>
pub fn from_scalars( s0: impl Into<FieldBytes>, s1: impl Into<FieldBytes>, ) -> Result<Self>
Create a Signature from the serialized s0 and s1 scalar values
which comprise the signature.
Sourcepub fn to_bytes(&self) -> SignatureBytes
pub fn to_bytes(&self) -> SignatureBytes
Serialize this signature as bytes.
Sourcepub fn s0_bytes(&self) -> FieldBytes
pub fn s0_bytes(&self) -> FieldBytes
Bytes for the s0 component of a signature.
Sourcepub fn s1_bytes(&self) -> FieldBytes
pub fn s1_bytes(&self) -> FieldBytes
Bytes for the s1 component of a signature.
Source§impl Signature
impl Signature
Sourcepub fn s0(&self) -> NonZeroScalar
Available on crate feature arithmetic only.
pub fn s0(&self) -> NonZeroScalar
arithmetic only.Get the s0 word component of this signature
Sourcepub fn s1(&self) -> NonZeroScalar
Available on crate feature arithmetic only.
pub fn s1(&self) -> NonZeroScalar
arithmetic only.Get the s1 word component of this signature
Sourcepub fn split_scalars(&self) -> (NonZeroScalar, NonZeroScalar)
Available on crate feature arithmetic only.
pub fn split_scalars(&self) -> (NonZeroScalar, NonZeroScalar)
arithmetic only.Split the signature into its s0 and s1 scalars.
Trait Implementations§
Source§impl From<&Signature> for SignatureBytes
impl From<&Signature> for SignatureBytes
Source§fn from(signature: &Signature) -> SignatureBytes
fn from(signature: &Signature) -> SignatureBytes
Converts to this type from the input type.
Source§impl From<Signature> for SignatureBytes
impl From<Signature> for SignatureBytes
Source§fn from(signature: Signature) -> SignatureBytes
fn from(signature: Signature) -> SignatureBytes
Converts to this type from the input type.
Source§impl PrehashSigner<Signature> for SigningKey
Available on crate feature arithmetic only.
impl PrehashSigner<Signature> for SigningKey
Available on crate feature
arithmetic only.Source§impl PrehashVerifier<Signature> for VerifyingKey
Available on crate feature arithmetic only.
impl PrehashVerifier<Signature> for VerifyingKey
Available on crate feature
arithmetic only.Source§impl SignatureEncoding for Signature
impl SignatureEncoding for Signature
Source§impl Signer<Signature> for SigningKey
Available on crate feature arithmetic only.
impl Signer<Signature> for SigningKey
Available on crate feature
arithmetic only.Source§impl Verifier<Signature> for VerifyingKey
Available on crate feature arithmetic only.
impl Verifier<Signature> for VerifyingKey
Available on crate feature
arithmetic only.impl Copy for Signature
impl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
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