Skip to main content

VerKeyCode

Enum VerKeyCode 

Source
pub enum VerKeyCode {
    Ed25519,
    Ed25519N,
    ECDSA256k1,
    ECDSA256k1N,
    Ed448,
    Ed448N,
    ECDSA256r1,
    ECDSA256r1N,
}
Available on crate feature core only.
Expand description

CESR codes for verification (public) keys, both transferable and non-transferable.

Variants§

§

Ed25519

Ed25519 transferable (rotatable) public key.

§

Ed25519N

Ed25519 non-transferable (non-rotatable) public key.

§

ECDSA256k1

secp256k1 (ECDSA) transferable compressed public key.

§

ECDSA256k1N

secp256k1 (ECDSA) non-transferable compressed public key.

§

Ed448

Ed448 transferable public key.

§

Ed448N

Ed448 non-transferable public key.

§

ECDSA256r1

secp256r1 / P-256 (ECDSA) transferable compressed public key.

§

ECDSA256r1N

secp256r1 / P-256 (ECDSA) non-transferable compressed public key.

Implementations§

Source§

impl VerKeyCode

Source

pub const fn is_transferable(&self) -> bool

Returns true if this key can be rotated (transferable prefix).

Source

pub const fn is_non_transferable(&self) -> bool

Returns true if this key cannot be rotated (non-transferable prefix).

Trait Implementations§

Source§

impl CesrCode for VerKeyCode

Source§

fn to_matter_code(&self) -> MatterCode

Converts this typed code to the untyped MatterCode.
Source§

fn as_str(&self) -> &'static str

Returns the canonical Base64 string representation of this code.
Source§

fn get_sizage(&self) -> Sizage

Returns the Sizage descriptor for this code.
Source§

fn raw_size(&self) -> Result<usize, ValidationError>

Returns the expected raw byte size for this code. Read more
Source§

fn placeholder(&self) -> Result<String, ValidationError>

Available on crate feature alloc only.
Returns a placeholder qb64 string of this code’s full character width, filled with DUMMY_CHAR. Read more
Source§

impl Clone for VerKeyCode

Source§

fn clone(&self) -> VerKeyCode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for VerKeyCode

Source§

impl Debug for VerKeyCode

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for VerKeyCode

Source§

impl From<VerKeyCode> for MatterCode

Source§

fn from(code: VerKeyCode) -> Self

Converts to this type from the input type.
Source§

impl Hash for VerKeyCode

Source§

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

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
Source§

impl PartialEq for VerKeyCode

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for VerKeyCode

Source§

impl TryFrom<MatterCode> for VerKeyCode

Source§

type Error = ValidationError

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

fn try_from(code: MatterCode) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.