Skip to main content

SelectKeyClient

Trait SelectKeyClient 

Source
pub trait SelectKeyClient {
    // Required methods
    fn get_key_count_done(&self, count: usize);
    fn select_key_done(
        &self,
        index: usize,
        metadata: usize,
        error: Result<(), ErrorCode>,
    );
}
Expand description

Client for selecting keys.

Required Methods§

Source

fn get_key_count_done(&self, count: usize)

Called when the number of keys available is known.

Source

fn select_key_done( &self, index: usize, metadata: usize, error: Result<(), ErrorCode>, )

Called when the specified key is active and ready to use for the next cryptographic operation.

§Arguments
  • index: The index of the key that was selected.
  • metadata: An opaque usize of metadata associated with the key. This can be used with CheckResultAcceptMetadata to assign metadata with the accepted credential.
§error:
  • Ok(()): The key was selected successfully.
  • Err(()): The key was selected set successfully.
    • ErrorCode::INVAL: The index was not valid.
    • ErrorCode::FAIL: The key could not be set.

Implementors§