pub struct NewsroomKeyPair { /* private fields */ }Expand description
Newsroom keypair used for signing.
Implementations§
Source§impl NewsroomKeyPair
impl NewsroomKeyPair
pub fn new<R: RngCore + CryptoRng>(rng: &mut R) -> Result<Self, Error>
Sourcepub fn verifying_key(&self) -> VerifyingKey
pub fn verifying_key(&self) -> VerifyingKey
Returns the verification key.
Sourcepub fn sign<D: DomainTag>(&self, msg: &[u8]) -> Signature<D>
pub fn sign<D: DomainTag>(&self, msg: &[u8]) -> Signature<D>
Sign msg in domain D using the newsroom signing key.
Sourcepub fn from_bytes(seed: [u8; 32]) -> Self
pub fn from_bytes(seed: [u8; 32]) -> Self
Reconstruct a NewsroomKeyPair from its secret.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NewsroomKeyPair
impl RefUnwindSafe for NewsroomKeyPair
impl Send for NewsroomKeyPair
impl Sync for NewsroomKeyPair
impl Unpin for NewsroomKeyPair
impl UnsafeUnpin for NewsroomKeyPair
impl UnwindSafe for NewsroomKeyPair
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