pub struct MlDsa65PublicKey(/* private fields */);Expand description
An ML-DSA-65 public key.
§BCS
The BCS serialized form for this type is defined by the following ABNF:
mldsa65-public-key = 1952OCTECTImplementations§
Source§impl MlDsa65PublicKey
impl MlDsa65PublicKey
pub const fn new(bytes: [u8; 1952]) -> Self
Sourcepub const fn into_inner(self) -> [u8; 1952]
pub const fn into_inner(self) -> [u8; 1952]
Return the underlying byte array of an MlDsa65PublicKey.
pub const fn inner(&self) -> &[u8; 1952]
pub const fn as_bytes(&self) -> &[u8] ⓘ
pub fn from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self, TryFromSliceError>
Source§impl MlDsa65PublicKey
impl MlDsa65PublicKey
Sourcepub fn scheme(&self) -> SignatureScheme
pub fn scheme(&self) -> SignatureScheme
Return the flag for this signature scheme
Source§impl MlDsa65PublicKey
impl MlDsa65PublicKey
Sourcepub fn derive_address(&self) -> Address
Available on crate feature hash only.
pub fn derive_address(&self) -> Address
hash only.Derive an Address from this Public Key
hash( 0x07 || 1952-byte ml-dsa-65 public key)
Trait Implementations§
Source§impl Arbitrary for MlDsa65PublicKey
Available on crate feature proptest only.
impl Arbitrary for MlDsa65PublicKey
Available on crate feature
proptest only.Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<MlDsa65PublicKey>
type Strategy = BoxedStrategy<MlDsa65PublicKey>
The type of
Strategy used to generate values of type Self.Source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
Source§impl AsRef<[u8]> for MlDsa65PublicKey
impl AsRef<[u8]> for MlDsa65PublicKey
Source§impl Clone for MlDsa65PublicKey
impl Clone for MlDsa65PublicKey
Source§fn clone(&self) -> MlDsa65PublicKey
fn clone(&self) -> MlDsa65PublicKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MlDsa65PublicKey
impl Debug for MlDsa65PublicKey
Source§impl<'de> Deserialize<'de> for MlDsa65PublicKey
Available on crate feature serde only.
impl<'de> Deserialize<'de> for MlDsa65PublicKey
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for MlDsa65PublicKey
impl Display for MlDsa65PublicKey
impl Eq for MlDsa65PublicKey
Source§impl From<MlDsa65PublicKey> for [u8; 1952]
impl From<MlDsa65PublicKey> for [u8; 1952]
Source§fn from(public_key: MlDsa65PublicKey) -> Self
fn from(public_key: MlDsa65PublicKey) -> Self
Converts to this type from the input type.
Source§impl FromStr for MlDsa65PublicKey
impl FromStr for MlDsa65PublicKey
Source§impl Hash for MlDsa65PublicKey
impl Hash for MlDsa65PublicKey
Source§impl Ord for MlDsa65PublicKey
impl Ord for MlDsa65PublicKey
Source§fn cmp(&self, other: &MlDsa65PublicKey) -> Ordering
fn cmp(&self, other: &MlDsa65PublicKey) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MlDsa65PublicKey
impl PartialEq for MlDsa65PublicKey
Source§impl PartialOrd for MlDsa65PublicKey
impl PartialOrd for MlDsa65PublicKey
Source§impl Serialize for MlDsa65PublicKey
Available on crate feature serde only.
impl Serialize for MlDsa65PublicKey
Available on crate feature
serde only.impl StructuralPartialEq for MlDsa65PublicKey
Auto Trait Implementations§
impl Freeze for MlDsa65PublicKey
impl RefUnwindSafe for MlDsa65PublicKey
impl Send for MlDsa65PublicKey
impl Sync for MlDsa65PublicKey
impl Unpin for MlDsa65PublicKey
impl UnsafeUnpin for MlDsa65PublicKey
impl UnwindSafe for MlDsa65PublicKey
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
U: Sized,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
U: Sized,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<'de, T> FromBcs for Twhere
T: Deserialize<'de>,
impl<'de, T> FromBcs for Twhere
T: Deserialize<'de>,
Source§fn from_bcs<'de>(bytes: &'de [u8]) -> Result<Self, Error>where
Self: Deserialize<'de>,
fn from_bcs<'de>(bytes: &'de [u8]) -> Result<Self, Error>where
Self: Deserialize<'de>,
Available on crate feature
serde only.Source§fn from_bcs_base64(base64: &str) -> Result<Self, Error>where
Self: DeserializeOwned,
fn from_bcs_base64(base64: &str) -> Result<Self, Error>where
Self: DeserializeOwned,
Available on crate feature
serde only.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more