// -*- mode: rust; -*- // // This file is part of redjubjub. // Copyright (c) 2019-2021 Zcash Foundation // See LICENSE for licensing information. // // Authors: // - Henry de Valence //! Redjubjub Signatures use crate::SigType; /// A RedJubJub signature. #[derive(Copy, Clone, Debug, Eq, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Signature(pub(crate) reddsa::Signature); impl From<[u8; 64]> for Signature { fn from(bytes: [u8; 64]) -> Signature { Signature(reddsa::Signature::<_>::from(bytes)) } } impl From> for [u8; 64] { fn from(sig: Signature) -> [u8; 64] { sig.0.into() } }