Add C API (#5072)
This commit is contained in:
@@ -19,6 +19,7 @@ use std::str::FromStr;
|
||||
|
||||
pub type Keypair = ed25519_dalek::Keypair;
|
||||
|
||||
#[repr(transparent)]
|
||||
#[derive(Serialize, Deserialize, Clone, Copy, Default, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
pub struct Signature(GenericArray<u8, U64>);
|
||||
|
||||
@@ -74,6 +75,12 @@ impl fmt::Display for Signature {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<[u8; 64]> for Signature {
|
||||
fn into(self) -> [u8; 64] {
|
||||
<GenericArray<u8, U64> as Into<[u8; 64]>>::into(self.0)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum ParseSignatureError {
|
||||
WrongSize,
|
||||
|
Reference in New Issue
Block a user