NAME

Crypt::HSM::Mechanism - A PKCS11 mechanism

VERSION

version 0.016

SYNOPSIS

my @signers = grep { $_->has_flags('sign', 'verify') } $slot->mechanisms;

DESCRIPTION

This represents a mechanism in a PKCS implementation.

METHODS

name()

This returns the name of the mechanism

min_key_size()

This returns the minimum key size for this mechanism.

max_key_size()

This returns the maximum key size for this mechanism.

flags()

This array lists properties of the mechanism. It may contain values like 'encrypt', 'decrypt', 'sign', 'verify', 'generate', 'wrap' and 'unwrap'.

has_flags(@flags)

This returns true the flags contain all of @flags.

info()

This returns a hash with information about the mechanism. This includes the following fields.

  • min-key-size

    The minimum key size

  • max-key-size

    The maximum key size

  • flags

    This contains the flags much like the flags method.

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.