Type Alias hotshot_types::signature_key::BLSPrivKey

source ·
pub type BLSPrivKey = SignKey;
Expand description

BLS private key used to sign a message

Aliased Type§

struct BLSPrivKey(/* private fields */);

Implementations

§

impl SignKey

pub fn generate<R>(prng: &mut R) -> SignKey
where R: CryptoRng + RngCore,

Signature Key generation function

pub fn to_bytes(&self) -> Vec<u8>

Explicit calls to serialize a SignKey into bytes.

pub fn from_bytes(bytes: &[u8]) -> SignKey

Deserialize SignKey from bytes.

pub fn to_tagged_base64(&self) -> Result<TaggedBase64, Tb64Error>

Explicit calls to serialize a SignKey into TaggedBase64.

Trait Implementations§

source§

impl PrivateSignatureKey for BLSPrivKey

source§

fn to_bytes(&self) -> Vec<u8>

Serialize the private key into bytes
source§

fn from_bytes(bytes: &[u8]) -> Result<Self>

Deserialize the private key from bytes Read more
source§

fn to_tagged_base64(&self) -> Result<TaggedBase64, Tb64Error>

Serialize the private key into TaggedBase64 blob. Read more
§

impl Clone for SignKey

§

fn clone(&self) -> SignKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for SignKey

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for SignKey

§

fn default() -> SignKey

Returns the “default value” for a type. Read more
§

impl Hash for SignKey

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl PartialEq for SignKey

§

fn eq(&self, other: &SignKey) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<'a> TryFrom<&'a TaggedBase64> for SignKey

§

type Error = Tb64Error

The type returned in the event of a conversion error.
§

fn try_from( tb: &'a TaggedBase64, ) -> Result<SignKey, <SignKey as TryFrom<&'a TaggedBase64>>::Error>

Performs the conversion.
§

impl TryFrom<TaggedBase64> for SignKey

§

type Error = Tb64Error

The type returned in the event of a conversion error.
§

fn try_from( tb: TaggedBase64, ) -> Result<SignKey, <SignKey as TryFrom<TaggedBase64>>::Error>

Performs the conversion.
§

impl Zeroize for SignKey

§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.
§

impl Eq for SignKey

§

impl StructuralPartialEq for SignKey