Skip to main content

wrap_key

Function wrap_key 

Source
pub fn wrap_key(
    key: PrivateKey,
    rsa_hash: Option<HashAlg>,
) -> PrivateKeyWithHashAlg
Expand description

Wraps a PrivateKey with the appropriate RSA hash algorithm.

For RSA keys, rsa_hash should be the result of Handle::best_supported_rsa_hash (falling back to SHA-256 if the query fails or returns None). For all other key types the hash_alg field is ignored by russh.