#[non_exhaustive]pub enum KeyCodec {
Secp256k1,
X25519,
Ed25519,
P256,
Rsa,
}Expand description
The multicodec codes of the public key types this crate reads from and writes to a Multikey.
The codes are the multicodec table entries; each key is the raw form the table names.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Secp256k1
secp256k1-pub (0xe7): a compressed SEC1 point, 33 bytes.
X25519
x25519-pub (0xec): the 32-byte X25519 public key of RFC 7748.
Ed25519
ed25519-pub (0xed): the 32-byte Ed25519 public key of RFC 8032.
P256
p256-pub (0x1200): a compressed SEC1 point, 33 bytes.
Rsa
rsa-pub (0x1205): a DER-encoded PKCS #1 RSAPublicKey (RFC 8017 Appendix A.1.1).
Implementations§
Trait Implementations§
impl Copy for KeyCodec
impl Eq for KeyCodec
impl StructuralPartialEq for KeyCodec
Auto Trait Implementations§
impl Freeze for KeyCodec
impl RefUnwindSafe for KeyCodec
impl Send for KeyCodec
impl Sync for KeyCodec
impl Unpin for KeyCodec
impl UnsafeUnpin for KeyCodec
impl UnwindSafe for KeyCodec
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.