---
name: "Crypt::PBKDF2::Hash"
section: "3pm"
platform: "linux"
package: "perl-crypt-pbkdf2"
version: "0.261630-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/Crypt::PBKDF2::Hash"
---

# Crypt::PBKDF2::Hash(3pm)

Abstract role for PBKDF2 hashing algorithms.

## NAME

Crypt::PBKDF2::Hash - Abstract role for PBKDF2 hashing algorithms.

## VERSION

version 0.261630

## METHODS

### hash\_len()

Returns the length (in bytes) of the hashes this algorithm generates.

### generate($data, $key)

Generate strong pseudorandom bits based on the `$data` and `$key`

### to\_algo\_string()

Return a string representing any optional arguments this object was created with, for use by Crypt::PBKDF2's `"generate"` and `"encode_string"` methods. May return undef if no arguments are required, in which case none will be serialized and `"from_algo_string"` won't be called on reading the hash.

### from\_algo\_string($str)

Given a string as produced by `"from_algo_string"`, return an instance of this class with options corresponding to those in `$str`. If no options are expected, it's permissible for this method to throw an exception.

## AUTHOR

Andrew Rodland \<andrew@cleverdomain.org\>

## COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Andrew Rodland.

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