Add more transparency into some EC structures. (#641)
This adds the ability to create ECDH keys from raw bytes and export signatures as raw bytes.
This commit is contained in:
@@ -73,7 +73,6 @@ pub trait Signature: Sized {
|
||||
fn from_slice(bytes: &[u8; EC_SIGNATURE_SIZE]) -> Option<Self>;
|
||||
|
||||
/// Writes the signature bytes into the passed in parameter.
|
||||
#[cfg(feature = "std")]
|
||||
fn to_slice(&self, bytes: &mut [u8; EC_SIGNATURE_SIZE]);
|
||||
|
||||
/// Encodes the signatures as ASN1 DER.
|
||||
|
||||
@@ -169,7 +169,6 @@ impl ecdsa::Signature for SoftwareEcdsaSignature {
|
||||
crypto::ecdsa::Signature::from_bytes(bytes).map(|s| SoftwareEcdsaSignature { signature: s })
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
fn to_slice(&self, bytes: &mut [u8; EC_SIGNATURE_SIZE]) {
|
||||
self.signature.to_bytes(bytes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user