pub struct Signature { /* private fields */ }Expand description
Ed448 signature.
This type represents a container for the byte serialization of an Ed448 signature, and does not necessarily represent well-formed field or curve elements.
Signature verification libraries are expected to reject invalid field elements at the time a signature is verified.
Implementations§
Source§impl Signature
impl Signature
Sourcepub fn from_bytes(bytes: &SignatureBytes) -> Self
pub fn from_bytes(bytes: &SignatureBytes) -> Self
Parse an Ed448 signature from a byte slice.
Sourcepub fn from_slice(bytes: &[u8]) -> Result<Self>
pub fn from_slice(bytes: &[u8]) -> Result<Self>
Sourcepub fn r_bytes(&self) -> &ComponentBytes
pub fn r_bytes(&self) -> &ComponentBytes
Bytes for the R component of a signature.
Sourcepub fn s_bytes(&self) -> &ComponentBytes
pub fn s_bytes(&self) -> &ComponentBytes
Bytes for the s component of a signature.
Sourcepub fn to_bytes(&self) -> SignatureBytes
pub fn to_bytes(&self) -> SignatureBytes
Return the inner byte array.
Sourcepub fn from_components(
r: impl Into<ComponentBytes>,
s: impl Into<ComponentBytes>,
) -> Self
pub fn from_components( r: impl Into<ComponentBytes>, s: impl Into<ComponentBytes>, ) -> Self
Create a Signature from the serialized r and s component values
which comprise the signature.
Trait Implementations§
Source§impl AssociatedAlgorithmIdentifier for Signature
Available on crate feature pkcs8 only.
impl AssociatedAlgorithmIdentifier for Signature
Available on crate feature
pkcs8 only.Source§const ALGORITHM_IDENTIFIER: AlgorithmIdentifierRef<'static> = pkcs8::ALGORITHM_ID
const ALGORITHM_IDENTIFIER: AlgorithmIdentifierRef<'static> = pkcs8::ALGORITHM_ID
AlgorithmIdentifier for this structure.Source§impl<'de> Deserialize<'de> for Signature
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Signature
Available on crate feature
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'de> Deserialize<'de> for Signature
Available on crate features serde and serde_bytes only.
impl<'de> Deserialize<'de> for Signature
Available on crate features
serde and serde_bytes only.fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl From<&[u8; 114]> for Signature
impl From<&[u8; 114]> for Signature
Source§fn from(bytes: &SignatureBytes) -> Self
fn from(bytes: &SignatureBytes) -> Self
Converts to this type from the input type.
Source§impl From<&Signature> for SignatureBytes
impl From<&Signature> for SignatureBytes
Source§fn from(sig: &Signature) -> SignatureBytes
fn from(sig: &Signature) -> SignatureBytes
Converts to this type from the input type.
Source§impl From<[u8; 114]> for Signature
impl From<[u8; 114]> for Signature
Source§fn from(bytes: SignatureBytes) -> Self
fn from(bytes: SignatureBytes) -> Self
Converts to this type from the input type.
Source§impl From<Signature> for SignatureBytes
impl From<Signature> for SignatureBytes
Source§fn from(sig: Signature) -> SignatureBytes
fn from(sig: Signature) -> SignatureBytes
Converts to this type from the input type.
Source§impl FromStr for Signature
Decode a signature from hexadecimal.
impl FromStr for Signature
Decode a signature from hexadecimal.
Upper and lower case hexadecimal are both accepted, however mixed case is rejected.
Source§impl SignatureBitStringEncoding for Signature
Available on crate features alloc and pkcs8 only.
impl SignatureBitStringEncoding for Signature
Available on crate features
alloc and pkcs8 only.Source§impl SignatureEncoding for Signature
impl SignatureEncoding for Signature
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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DynAssociatedAlgorithmIdentifier for Twhere
T: AssociatedAlgorithmIdentifier,
impl<T> DynAssociatedAlgorithmIdentifier for Twhere
T: AssociatedAlgorithmIdentifier,
Source§fn algorithm_identifier(&self) -> Result<AlgorithmIdentifier<Any>, Error>
fn algorithm_identifier(&self) -> Result<AlgorithmIdentifier<Any>, Error>
AlgorithmIdentifier for this structure. Read more