pub fn tsk_to_private_key_import(
key_data: &[u8],
) -> Result<(PrivateKeyImport, KeyMechanism), Error>
Expand description
Converts an OpenPGP Transferable Secret Key into PrivateKeyImport
object.
ยงErrors
Returns an crate::Error::OpenPgp
if creating a PrivateKeyImport
from key_data
is not
possible.
Returns an crate::Error::Key
if an RSA public key is shorter than
crate::MIN_RSA_BIT_LENGTH
.