Struct p256_cortex_m4::Signature
source · pub struct Signature { /* private fields */ }
Expand description
NIST P-256 signature.
TODO: It seems we might be able to use the p256
machinery for this,
instead of reimplementing it ourselves.
Implementations§
source§impl Signature
impl Signature
sourcepub fn from_untagged_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_untagged_bytes(bytes: &[u8]) -> Result<Self>
Decode signature as big-endian r, then big-endian s, without framing.
Necessarily, bytes must be of length 64, and r and s must be integers in the range 1..=n-1, otherwise decoding fails.
sourcepub fn to_untagged_bytes(&self) -> [u8; 64]
pub fn to_untagged_bytes(&self) -> [u8; 64]
Encode signature from big-endian r, then big-endian s, without framing.
Trait Implementations§
Auto Trait Implementations§
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