GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
OpenXPKI::Password(3) User Contributed Perl Documentation OpenXPKI::Password(3)

OpenXPKI::Password - password hashing and checking

Provides utility functions for hashing passwords and checking passwords against a hash

hashes a password according to the provided scheme.

SCHEME is one of sha (SHA1), md5 (MD5), crypt (Unix crypt), smd5 (salted MD5), ssha (salted SHA1), ssha (salted SHA256) or argon2.

It returns a hash in the format "{SCHEME}encrypted_string", or undef if no hash could be computed.

For argon2 the return format is unencoded token generated by Crypt::Argon2 "$argon...".

For all algorithms except argon2, params can be the encoded part of a prior call to hash which effectively extracts the salt from the given string which will result in the same encoded string if the same password was given. The default is to create a random salt of suitable size.

For argon2 params must be a hashref with the following options, options are passed as-is to Crypt::Argon2::argon2id_pass, details on the options can be found there.

salt
A literal value to be used as salt. The class does not make any checks so make sure the salt has enough entropy.
saltbytes
Number of bytes to generate a salt, the default is 16 bytes. Is overridden by salt.
time
argon2 time cost factor, default is 3.
memory
argon2 memory cost factor, expects a memory size in k, M or G, default is 32M.
p
paralellism factor, default is 1.
tag
tag size, default is 16.

checks if a password matches the provided digest.

The digest must have the format: "{SCHEME}encrypted_string" or must start with $argon2

SCHEME is one of sha (SHA1), md5 (MD5), crypt (Unix crypt), smd5 (encrypted MD5) or ssha (encrypted SHA1).

It returns 1 if the password matches the digest, 0 otherwise.

2022-05-14 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.