Struct yubihsm::Credentials
source · [−]Expand description
Credentials used to establish a session with the HSM
Fields
authentication_key_id: Id
Key ID to authenticate with
authentication_key: Key
Auth key to authenticate with
Implementations
sourceimpl Credentials
impl Credentials
sourcepub fn new(authentication_key_id: Id, authentication_key: Key) -> Self
pub fn new(authentication_key_id: Id, authentication_key: Key) -> Self
Create new Credentials
(auth key ID + authentication::Key
)
sourcepub fn from_password(authentication_key_id: Id, password: &[u8]) -> Self
Available on crate feature passwords
only.
pub fn from_password(authentication_key_id: Id, password: &[u8]) -> Self
passwords
only.Create a set of credentials from the given auth key and password Uses the same password-based key derivation method as yubihsm-shell (PBKDF2 + static salt), which is not particularly strong, so use of a long, random password is recommended.
Trait Implementations
sourceimpl Clone for Credentials
impl Clone for Credentials
sourcefn clone(&self) -> Credentials
fn clone(&self) -> Credentials
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Credentials
impl Debug for Credentials
Auto Trait Implementations
impl RefUnwindSafe for Credentials
impl Send for Credentials
impl Sync for Credentials
impl Unpin for Credentials
impl UnwindSafe for Credentials
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more