wots_rs/signature.rs
1//! WOTS signature.
2
3/// An WOTS signature.
4#[derive(Eq, PartialEq)]
5pub struct Signature([[u8; 32]; 32]);
6
7impl Signature {
8 /// Convert this signature to a byte array.
9 pub fn to_bytes(&self) -> [[u8; 32]; 32] {
10 self.0
11 }
12}
13
14/// Construct a `Signature` from a bytes.
15impl From<[[u8; 32]; 32]> for Signature {
16 fn from(value: [[u8; 32]; 32]) -> Self {
17 Self(value)
18 }
19}