NAME

Crypt::HSM - A PKCS11 interface for Perl

VERSION

version 0.015

SYNOPSIS

my $hsm = Crypt::HSM->load('/usr/lib/pkcs11/libsofthsm2.so');
my ($slot) = $hsm->slots;
my $session = $slot->open_session;
$session->login('user', '1234');

my ($key) = $session->find_objects({ class => 'secret-key', label => "my-key" });
my $ciphertext = $session->encrypt('aes-gcm', $key, $plaintext, $iv);

DESCRIPTION

This module interfaces with any PKCS11 library to use its cryptography.

METHODS

load($path)

This loads the pkcs11 found a $path, and returns it as a new Crypt::HSM::Provider object.

AUTHOR

Leon Timmermans <leont@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2023 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.