Struct libyubihsm::Session
[−]
[src]
pub struct Session { /* fields omitted */ }
Represents a Session
with the HSM.
The Session
is where the bulk of the YubiHSM's functionality is found. A Session
is needed
to perform any cryptographic or device administration tasks.
Methods
impl Session
[src]
pub fn reset(self) -> Result<(), Error>
[src]
Reset the device to factory settings and reboot.
Note that since the device reboots when this function is called, this function is far more
likely to return a ReturnCode::NetError
upon success, since it will vanish out from
underneath the connector. However, it is left to library consumers to decide whether or not
this is an acceptable result.
pub fn list_objects(&self) -> ListObjectsQuery
[src]
pub fn get_object_info(
&self,
id: u16,
object_type: ObjectType
) -> Result<ObjectInfo, Error>
[src]
&self,
id: u16,
object_type: ObjectType
) -> Result<ObjectInfo, Error>
pub fn delete_object(
&self,
obj_id: u16,
obj_type: ObjectType
) -> Result<(), Error>
[src]
&self,
obj_id: u16,
obj_type: ObjectType
) -> Result<(), Error>
pub fn get_random(&self, len: usize) -> Result<Vec<u8>, Error>
[src]
pub fn sign_ecdsa<T: AsRef<[u8]>>(
&self,
key_id: u16,
data: T
) -> Result<Vec<u8>, Error>
[src]
&self,
key_id: u16,
data: T
) -> Result<Vec<u8>, Error>
pub fn sign_eddsa<T: AsRef<[u8]>>(
&self,
key_id: u16,
data: T
) -> Result<Vec<u8>, Error>
[src]
&self,
key_id: u16,
data: T
) -> Result<Vec<u8>, Error>
pub fn sign_pkcs1v1_5<T: AsRef<[u8]>>(
&self,
key_id: u16,
hashed: bool,
data: T
) -> Result<Vec<u8>, Error>
[src]
&self,
key_id: u16,
hashed: bool,
data: T
) -> Result<Vec<u8>, Error>
pub fn sign_pss<T: AsRef<[u8]>>(
&self,
key_id: u16,
salt_len: usize,
mgf1_algorithm: Algorithm,
data: T
) -> Result<Vec<u8>, Error>
[src]
&self,
key_id: u16,
salt_len: usize,
mgf1_algorithm: Algorithm,
data: T
) -> Result<Vec<u8>, Error>
pub fn generate_key_ec(
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm
) -> Result<(), Error>
[src]
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm
) -> Result<(), Error>
pub fn generate_key_ed(
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm
) -> Result<(), Error>
[src]
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm
) -> Result<(), Error>
pub fn generate_key_hmac(
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm
) -> Result<(), Error>
[src]
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm
) -> Result<(), Error>
pub fn generate_key_rsa(
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm
) -> Result<(), Error>
[src]
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm
) -> Result<(), Error>
pub fn generate_wrapkey(
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
delegated_capabilities: &[Capability],
algorithm: Algorithm
) -> Result<(), Error>
[src]
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
delegated_capabilities: &[Capability],
algorithm: Algorithm
) -> Result<(), Error>
pub fn put_key_ec<T: AsRef<[u8]>>(
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm,
s: T
) -> Result<(), Error>
[src]
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm,
s: T
) -> Result<(), Error>
pub fn put_key_ed<T: AsRef<[u8]>>(
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm,
k: T
) -> Result<(), Error>
[src]
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm,
k: T
) -> Result<(), Error>
pub fn put_key_hmac<T: AsRef<[u8]>>(
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm,
key: T
) -> Result<(), Error>
[src]
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm,
key: T
) -> Result<(), Error>
pub fn put_key_rsa<T: AsRef<[u8]>>(
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm,
p: T,
q: T
) -> Result<(), Error>
[src]
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm,
p: T,
q: T
) -> Result<(), Error>
pub fn put_wrapkey<T: AsRef<[u8]>>(
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
delegated_capabilities: &[Capability],
algorithm: Algorithm,
key: T
) -> Result<(), Error>
[src]
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
delegated_capabilities: &[Capability],
algorithm: Algorithm,
key: T
) -> Result<(), Error>
pub fn create_authkey(
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
delegated_capabilities: &[Capability],
password: &str
) -> Result<(), Error>
[src]
&self,
key_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
delegated_capabilities: &[Capability],
password: &str
) -> Result<(), Error>
pub fn put_opaque_object(
&self,
object_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm,
contents: &[u8]
) -> Result<(), Error>
[src]
&self,
object_id: u16,
label: &str,
domains: &[Domain],
capabilities: &[Capability],
algorithm: Algorithm,
contents: &[u8]
) -> Result<(), Error>
pub fn get_pubkey(&self, key_id: u16) -> Result<PublicKey, Error>
[src]
pub fn get_logs(&self) -> Result<Log, Error>
[src]
pub fn set_log_index(&self, log_index: u16) -> Result<(), Error>
[src]
pub fn put_option(&self, option: DeviceOption) -> Result<(), Error>
[src]
Trait Implementations
impl Clone for Session
[src]
fn clone(&self) -> Session
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more