Struct yubihsm::authentication::Credentials
source · pub struct Credentials {
pub authentication_key_id: Id,
pub authentication_key: Key,
}
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§
source§impl 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§
source§impl Clone for Credentials
impl Clone for Credentials
source§fn clone(&self) -> Credentials
fn clone(&self) -> Credentials
Returns a copy of the value. Read more
1.0.0 · 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 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§
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