pub struct SkEd25519 { /* private fields */ }
Expand description
Security Key (FIDO/U2F) Ed25519 public key as specified in PROTOCOL.u2f.
Implementations§
source§impl SkEd25519
impl SkEd25519
sourcepub fn new(public_key: Ed25519PublicKey, application: impl Into<String>) -> Self
Available on crate feature alloc
only.
pub fn new(public_key: Ed25519PublicKey, application: impl Into<String>) -> Self
alloc
only.Construct new instance of SkEd25519.
sourcepub fn public_key(&self) -> &Ed25519PublicKey
pub fn public_key(&self) -> &Ed25519PublicKey
Get the Ed25519 private key for this security key.
sourcepub fn application(&self) -> &str
Available on crate feature alloc
only.
pub fn application(&self) -> &str
alloc
only.Get the FIDO/U2F application (typically ssh:
).
Trait Implementations§
source§impl Encode for SkEd25519
impl Encode for SkEd25519
source§fn encoded_len(&self) -> Result<usize>
fn encoded_len(&self) -> Result<usize>
Get the length of this type encoded in bytes, prior to Base64 encoding.
source§fn encode(&self, writer: &mut impl Writer) -> Result<()>
fn encode(&self, writer: &mut impl Writer) -> Result<()>
Encode this value using the provided
Writer
.source§fn encoded_len_prefixed(&self) -> Result<usize, Error>
fn encoded_len_prefixed(&self) -> Result<usize, Error>
Return the length of this type after encoding when prepended with a
uint32
length prefix.source§fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value, first prepending a
uint32
length prefix
set to Encode::encoded_len
.source§impl From<Ed25519PublicKey> for SkEd25519
impl From<Ed25519PublicKey> for SkEd25519
source§fn from(public_key: Ed25519PublicKey) -> SkEd25519
fn from(public_key: Ed25519PublicKey) -> SkEd25519
Converts to this type from the input type.
source§impl From<SkEd25519> for Ed25519PublicKey
impl From<SkEd25519> for Ed25519PublicKey
source§fn from(sk: SkEd25519) -> Ed25519PublicKey
fn from(sk: SkEd25519) -> Ed25519PublicKey
Converts to this type from the input type.
source§impl Ord for SkEd25519
impl Ord for SkEd25519
source§impl PartialOrd for SkEd25519
impl PartialOrd for SkEd25519
impl Eq for SkEd25519
impl StructuralPartialEq for SkEd25519
Auto Trait Implementations§
impl Freeze for SkEd25519
impl RefUnwindSafe for SkEd25519
impl Send for SkEd25519
impl Sync for SkEd25519
impl Unpin for SkEd25519
impl UnwindSafe for SkEd25519
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)