pub fn unseal_from_credential(
        credential: &Credential,
        symmetric_key_bytes: &[u8],
    ) -> Result<KeyPair> {
        // Ed25519 is the only signature algorithm we presently support
        if credential.credential_type != credential::Type::SIGNATURE_KEY_PAIR {
            return Err(
                ErrorKind::KeyInvalid("not a signature key".to_string()).into(),
            );
        }

        KeyPair::unseal(
            SignatureAlg::Ed25519,
            EncryptionAlg::AES256GCM,
            symmetric_key_bytes,
            &credential.encrypted_value,
        )
    }
/// Unseal an encrypted `KeyPair` from a `Credential` object
Unseal an encrypted `KeyPair` from a `Credential` object
Unseal an encrypted ` KeyPair ` from a ` Credential ` object
pub fn unseal_from_credential(
        credential: &Credential,
        symmetric_key_bytes: &[u8],
    ) -> Result<KeyPair> {
        // Ed25519 is the only signature algorithm we presently support
        if credential.credential_type != credential::Type::SIGNATURE_KEY_PAIR {
            return Err(
                ErrorKind::KeyInvalid("not a signature key".to_string()).into(),
            );
        }
        KeyPair::unseal(
            SignatureAlg::Ed25519,
            EncryptionAlg::AES256GCM,
            symmetric_key_bytes,
            &credential.encrypted_value,
        )
    }
pub fn unseal_from_credential ( credential : & Credential , symmetric_key_bytes : & [ u8 ] , ) -> Result < KeyPair > { // Ed25519 is the only signature algorithm we presently support if credential . credential_type != credential :: Type :: SIGNATURE_KEY_PAIR { return Err ( ErrorKind :: KeyInvalid ( " " . to_string ( ) ) . into ( ) , ) ; } KeyPair :: unseal ( SignatureAlg :: Ed25519 , EncryptionAlg :: AES256GCM , symmetric_key_bytes , & credential . encrypted_value , ) }
Unseal an encrypted `KeyPair` from a `Credential` object
Unseal an encrypted ` KeyPair ` from a ` Credential ` object
credential
&Credential
symmetric_key_bytes
&[u8]
credential
&Credential
symmetric_key_bytes
&[u8]