pub struct Signature(_);
Expand description
Ed25519 signature.
Implementations§
source§impl Signature
impl Signature
sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Parse an Ed25519 signature from a byte slice.
sourcepub fn new(bytes: [u8; 64]) -> Self
👎Deprecated since 1.3.0: use ed25519::Signature::from_bytes instead
pub fn new(bytes: [u8; 64]) -> Self
DEPRECATED: Create a new signature from a byte array.
Panics
This method will panic if an invalid signature is encountered.
Use Signature::from_bytes
or Signature::try_from
instead for
a fallible conversion.
Trait Implementations§
source§impl From<[u8; 64]> for Signature
impl From<[u8; 64]> for Signature
DEPRECATED: use TryFrom<&[u8]>
instead.
Warning
This conversion will panic if a signature is invalid.
source§impl FromStr for Signature
impl FromStr for Signature
Decode a signature from hexadecimal.
Upper and lower case hexadecimal are both accepted, however mixed case is rejected.