NAME

Crypt::Bear::RSA::PrivateKey - An RSA private key in BearSSL

VERSION

version 0.002

SYNOPSIS

my $plaintext = $private_key->oaep_decrypt('sha256', $data, '');

my $signature = $private_key->pkcs1_sign('sha256', $hash);

DESCRIPTION

This represents an RSA public key.

METHODS

oaep_decrypt($digest, $ciphertext, $label)

This decrypts data encrypted by oaep_encrypt. The $digest and $label must match the values used with the encrypt operation.

pkcs1_sign($digest, $hash)

This signs a hash, and returns the signature.

AUTHOR

Leon Timmermans <fawaka@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2024 by Leon Timmermans.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.