Struct bc_components::Seed
source · pub struct Seed { /* private fields */ }Implementations§
source§impl Seed
impl Seed
pub const MIN_SEED_LENGTH: usize = 16usize
sourcepub fn new_with_len(count: usize) -> Result<Self>
pub fn new_with_len(count: usize) -> Result<Self>
Create a new random seed with a specified length.
If the number of bytes is less than 16, this will return None.
sourcepub fn new_with_len_using(
count: usize,
rng: &mut impl RandomNumberGenerator
) -> Result<Self>
pub fn new_with_len_using( count: usize, rng: &mut impl RandomNumberGenerator ) -> Result<Self>
Create a new random seed with a specified length.
If the number of bytes is less than 16, this will return None.
sourcepub fn new_opt(
data: impl Into<Bytes>,
name: Option<String>,
note: Option<String>,
creation_date: Option<Date>
) -> Result<Self>
pub fn new_opt( data: impl Into<Bytes>, name: Option<String>, note: Option<String>, creation_date: Option<Date> ) -> Result<Self>
Create a new seed from the data and options.
If the data is less than 16 bytes, this will return None.
sourcepub fn creation_date(&self) -> &Option<Date>
pub fn creation_date(&self) -> &Option<Date>
Return the creation date of the seed.
sourcepub fn set_creation_date(&mut self, creation_date: Option<Date>)
pub fn set_creation_date(&mut self, creation_date: Option<Date>)
Set the creation date of the seed.
Trait Implementations§
source§impl CBORDecodable for Seed
impl CBORDecodable for Seed
source§impl CBOREncodable for Seed
impl CBOREncodable for Seed
source§impl CBORTagged for Seed
impl CBORTagged for Seed
source§impl CBORTaggedDecodable for Seed
impl CBORTaggedDecodable for Seed
source§fn from_untagged_cbor(cbor: &CBOR) -> Result<Self>
fn from_untagged_cbor(cbor: &CBOR) -> Result<Self>
Creates an instance of this type by decoding it from untagged CBOR.
source§fn from_tagged_cbor(cbor: &CBOR) -> Result<Self, Error>where
Self: Sized,
fn from_tagged_cbor(cbor: &CBOR) -> Result<Self, Error>where Self: Sized,
Creates an instance of this type by decoding it from tagged CBOR.
source§impl CBORTaggedEncodable for Seed
impl CBORTaggedEncodable for Seed
source§fn untagged_cbor(&self) -> CBOR
fn untagged_cbor(&self) -> CBOR
Returns the untagged CBOR encoding of this instance.
source§fn tagged_cbor(&self) -> CBOR
fn tagged_cbor(&self) -> CBOR
Returns the tagged CBOR encoding of this instance.
source§impl PartialEq for Seed
impl PartialEq for Seed
source§impl PrivateKeysDataProvider for Seed
impl PrivateKeysDataProvider for Seed
source§fn private_keys_data(&self) -> Bytes
fn private_keys_data(&self) -> Bytes
Returns the private key data.
source§impl URDecodable for Seed
impl URDecodable for Seed
source§impl UREncodable for Seed
impl UREncodable for Seed
impl Eq for Seed
impl StructuralEq for Seed
impl StructuralPartialEq for Seed
impl URCodable for Seed
Auto Trait Implementations§
impl RefUnwindSafe for Seed
impl Send for Seed
impl Sync for Seed
impl Unpin for Seed
impl UnwindSafe for Seed
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
source§impl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)