The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Crypt::Pwsafe - Perl extension for decrypting and parsing PasswordSafe V3 data files


Version 1.2


    use Crypt::Pwsafe;
    my $file = 'pwsafe.psafe3';
    my $key = Crypt::Pwsafe::enter_combination();
    my $pwsafe = Crypt::Pwsafe->new($file, $key);

    # The password for 'user' at 'host' computer in 'Test group'
    my $passwd = $pwsafe->{'Test group'}->{'user@host'};


Crypt::Pwsafe module provide read-only access to database files created by Version 3 of PasswordSafe utility available from SourceForge at

Users of this module should take these notes:

1. All passwords will be stored in memory unencrypted (in the form of Perl hashes) once the password file is loaded.

2. The module will read the entire content of the password file into memory. This may be a problem for large data files on systems with small amount of memory.

3. The modules does not support Version 2 Passwordsafe data files. Please convert them to Version 3 if needed.


Shufeng Tan, <shufengtan at>


Please report any bugs or feature requests to bug-crypt-pwsafe at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc Crypt::Pwsafe

You can also look for information at:


PasswordSafe is a password database utility, originally developed by Counterpane Labs. PasswordSafe project is currently administered by Rony Shapiro. The project homepage is located at:


Copyright 2006 Shufeng Tan, all rights reserved.

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