#[repr(i32)]pub enum EcdsaSignatureEncoding {
UnknownEncoding = 0,
IeeeP1363 = 1,
Der = 2,
}
Variants§
UnknownEncoding = 0
IeeeP1363 = 1
The signature’s format is r || s, where r and s are zero-padded and have the same size in bytes as the order of the curve. For example, for NIST P-256 curve, r and s are zero-padded to 32 bytes.
Der = 2
The signature is encoded using ASN.1 (https://tools.ietf.org/html/rfc5480#appendix-A): ECDSA-Sig-Value :: = SEQUENCE { r INTEGER, s INTEGER }
Implementations§
Source§impl EcdsaSignatureEncoding
impl EcdsaSignatureEncoding
Sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true
if value
is a variant of EcdsaSignatureEncoding
.
Sourcepub fn from_i32(value: i32) -> Option<EcdsaSignatureEncoding>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<EcdsaSignatureEncoding>
Converts an i32
to a EcdsaSignatureEncoding
, or None
if value
is not a valid variant.
Source§impl EcdsaSignatureEncoding
impl EcdsaSignatureEncoding
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for EcdsaSignatureEncoding
impl Clone for EcdsaSignatureEncoding
Source§fn clone(&self) -> EcdsaSignatureEncoding
fn clone(&self) -> EcdsaSignatureEncoding
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more