yubihsm 0.20.0

Pure Rust client for YubiHSM2 devices with support for HTTP and USB-based access to the device. Supports most HSM functionality including ECDSA, Ed25519, HMAC, and RSA.
Documentation
//! Generate keys within the `YubiHSM2`

use crate::{Algorithm, Capability, Domain, ObjectId, ObjectLabel};

/// Parameters which are common to all key generation commands
#[derive(Serialize, Deserialize, Debug)]
pub(crate) struct GenerateKeyParams {
    /// ID of the key
    pub key_id: ObjectId,

    /// Label for the key (40-bytes)
    pub label: ObjectLabel,

    /// Domain in which the key will be accessible
    pub domains: Domain,

    /// Capability of the key
    pub capabilities: Capability,

    /// Key algorithm
    pub algorithm: Algorithm,
}