Struct yubihsm::session::Session
[−]
[src]
pub struct Session<'a> { /* fields omitted */ }
Encrypted session with the YubiHSM2
Methods
impl<'a> Session<'a>
[src]
pub fn new(
connector: &'a Connector,
host_challenge: &Challenge,
auth_key_id: ObjectId,
static_keys: &StaticKeys
) -> Result<Self, Error>
[src]
connector: &'a Connector,
host_challenge: &Challenge,
auth_key_id: ObjectId,
static_keys: &StaticKeys
) -> Result<Self, Error>
Create a new encrypted session using the given auth key and password
pub fn blink(&mut self, num_seconds: u8) -> Result<BlinkResponse, Error>
[src]
Blink the YubiHSM2's LEDs (to identify it) for the given number of seconds
pub fn delete_object(
&mut self,
object_id: ObjectId,
object_type: ObjectType
) -> Result<DeleteObjectResponse, Error>
[src]
&mut self,
object_id: ObjectId,
object_type: ObjectType
) -> Result<DeleteObjectResponse, Error>
Delete an object of the given ID and type
pub fn echo<T>(&mut self, message: T) -> Result<EchoResponse, Error> where
T: Into<Vec<u8>>,
[src]
T: Into<Vec<u8>>,
Have the card echo an input message
pub fn generate_asymmetric_key(
&mut self,
key_id: ObjectId,
label: ObjectLabel,
domains: Domains,
capabilities: Capabilities,
algorithm: Algorithm
) -> Result<GenAsymmetricKeyResponse, Error>
[src]
&mut self,
key_id: ObjectId,
label: ObjectLabel,
domains: Domains,
capabilities: Capabilities,
algorithm: Algorithm
) -> Result<GenAsymmetricKeyResponse, Error>
Generate a new asymmetric key within the YubiHSM2
pub fn get_object_info(
&mut self,
object_id: ObjectId,
object_type: ObjectType
) -> Result<GetObjectInfoResponse, Error>
[src]
&mut self,
object_id: ObjectId,
object_type: ObjectType
) -> Result<GetObjectInfoResponse, Error>
Get information about an object
pub fn get_pubkey(
&mut self,
key_id: ObjectId
) -> Result<GetPubKeyResponse, Error>
[src]
&mut self,
key_id: ObjectId
) -> Result<GetPubKeyResponse, Error>
Get the public key for an asymmetric key stored on the device
See GetPubKeyResponse
for more information about public key formats
pub fn id(&self) -> SessionId
[src]
Get the current session ID
pub fn list_objects(&mut self) -> Result<ListObjectsResponse, Error>
[src]
List objects visible from the current session
pub fn sign_data_eddsa<T>(
&mut self,
key_id: ObjectId,
data: T
) -> Result<SignDataEdDSAResponse, Error> where
T: Into<Vec<u8>>,
[src]
&mut self,
key_id: ObjectId,
data: T
) -> Result<SignDataEdDSAResponse, Error> where
T: Into<Vec<u8>>,
Compute an Ed25519 signature with the given key ID