Enum near_crypto::Signature [−][src]
pub enum Signature {
ED25519(Signature),
SECP256K1(Secp256K1Signature),
}
Expand description
Signature container supporting different curves.
Variants
ED25519(Signature)
Tuple Fields
0: Signature
SECP256K1(Secp256K1Signature)
Tuple Fields
Implementations
pub fn from_parts(
signature_type: KeyType,
signature_data: &[u8]
) -> Result<Self, ParseSignatureError>
pub fn from_parts(
signature_type: KeyType,
signature_data: &[u8]
) -> Result<Self, ParseSignatureError>
Construct Signature from key type and raw signature blob
Verifies that this signature is indeed signs the data with given public key.
Also if public key doesn’t match on the curve returns false
.
Trait Implementations
fn deserialize<D>(
deserializer: D
) -> Result<Self, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Self, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Signature
impl UnwindSafe for Signature
Blanket Implementations
Mutably borrows from an owned value. Read more