Crypt::...:Record(3)

πŸ“¦
version 1.23~20220227git002b0f0 Β· 2 versions
, in fedora 43

πŸ’– Crypt::PWSafe3::Record β€” the manual page, but make it cute πŸ’–

okay bestie, so this is Crypt::PWSafe3::Record(3) from the User Contributed Perl Documentation section, and it's literally the class that holds one single record from your Passwordsafe v3 vault. one entry, all its little fields, all its getters and setters. let's get into it πŸŽ€


✨ NAME ✨

Crypt::PWSafe3::Record β€” the class that represents a Passwordsafe v3 data record. she's the whole vibe of one entry. πŸ‘‘


🌸 SYNOPSIS 🌸

use Crypt::PWSafe3;
my $record = $vault->getrecord($uuid);
$record->title('t2');
$record->passwd('foobar');
print $record->notes;

like… grab a record out of the vault, rename her, reset her password, print her notes. that's it. that's the whole mood. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so Crypt::PWSafe3::Record represents one Passwordsafe v3 data record. every record is made up of a bunch of fields, and each one is of type Crypt::PWSafe3::Field. this class hands you get/set methods so you can reach in and grab or poke at the values of those fields. so handy. 🫢

you can also access the raw unencoded values of the fields by reaching for them directly β€” head over to Crypt::PWSafe3::Field for the deets on that one.

okay and here's the important part, no cap: if the record object was created by Crypt::PWSafe3 (and fetched with Crypt::PWSafe3::getrecord), then she's still associated with her Crypt::PWSafe3 parent object. so any changes you make to the record automatically get populated back into the parent object (the vault). iconic behaviour, honestly.

⚠️ but if you created the record object yourself? yeah, that link doesn't exist. no auto-sync back to any vault, because there is no vault. don't expect it. πŸ’€

πŸŽ€ METHODS πŸŽ€

uuid([string])

no argument β†’ returns the UUID. argument β†’ sets the UUID. the argument must be a hex representation of an Data::UUID object.

good news though: this gets generated automatically for new records, so you normally don't have to cope with it. she's already got it handled. πŸ’…

user([string])

no argument β†’ returns the username. argument β†’ sets the username. simple as.

title([string])

no argument β†’ returns the title. argument β†’ sets the title. slay.

passwd([string])

no argument β†’ returns the password. argument β†’ sets the password. πŸ”

notes([string])

no argument β†’ returns the notes. argument β†’ sets the notes. put whatever you want in there bestie, it's your vault.

group([string])

no argument β†’ returns the group. argument β†’ sets the group.

and you can do a whole group hierarchy by separating the subgroups with a dot, like:

$record->group('accounts.banking');

nesting! she contains multitudes! 🧚

ctime([time_t])

no argument β†’ returns the creation time. argument β†’ sets the creation time. the argument must be an integer timestamp as returned by time().

and yes, this is generated automatically for new records, so you normally don't have to cope with it. πŸ•

atime([time_t])

no argument β†’ returns the access time. argument β†’ sets the access time. argument must be an integer timestamp as returned by time().

⚠️ real talk: Crypt::PWSafe3 doesn't update the atime field currently. so if you mind, do it yourself. she's not gonna do it for you. πŸ™ˆ

mtime([time_t])

no argument β†’ returns the modification time of the passwd field. argument β†’ sets the modification time. argument must be an integer timestamp as returned by time().

this gets generated automatically for modified records if the passwd field changed, so you normally don't have to cope with it. πŸ”₯

lastmod([string])

no argument β†’ returns the modification time. argument β†’ sets the modification time. argument must be an integer timestamp as returned by time().

also generated automatically for modified records, so you normally don't have to cope with it. ✨

url([string])

no argument β†’ returns the url. argument β†’ sets the url. the url must be in the well known notation:

proto://host/path

pwhist([string])

no argument β†’ returns the password history. argument β†’ sets the password history.

⚠️ and again: Crypt::PWSafe3 doesn't update the pwhist field currently. so if you mind, do it yourself. refer to Crypt::PWSafe3::Databaseformat for more details. πŸ’€

pwpol([string])

no argument β†’ returns the password policy. argument β†’ sets the password policy.

this is the raw encoded policy string. if you actually want to access it properly, use the policy() method instead β€” see right below. πŸ‘‡

policy([Crypt::PWSafe3::PasswordPolicy object])

called with no arguments β†’ returns a Crypt::PWSafe3::PasswordPolicy object. see Crypt::PWSafe3::PasswordPolicy for the details on how to access it. πŸŽ€

want to modify the password policy? create a new Crypt::PWSafe3::PasswordPolicy object, or modify the existing one, and pass it as the argument to the policy method. that's the move.

pwexp([string])

no argument β†’ returns the password expire time. argument β†’ sets the password expire time.

⚠️ one more time for the people in the back: Crypt::PWSafe3 doesn't update the pwexp field currently. so if you mind, do it yourself. refer to Crypt::PWSafe3::Databaseformat for more details. ⏰

πŸ‘‘ MANDATORY FIELDS πŸ‘‘

Crypt::PWSafe3::Record creates the following fields automatically on creation, because those fields are mandatory. she's not asking, she's telling:

  • uuid will be generated using Data::UUID. 🌈
  • user, password, title will be set to the empty string.
  • ctime, atime, mtime, lastmod will be set to the current time of creation time. ⭐

🌟 SEE ALSO 🌟

  • Crypt::PWSafe3

go read her too, she's the main character. πŸ’œ


🫢 AUTHOR 🫢

T.v.Dein <tlinden@cpan.org>


Copyright (c) 2011-2015 by T.v.Dein <tlinden@cpan.org>. All rights reserved.


πŸ“œ LICENSE πŸ“œ

This program is free software; you can redistribute it and/or modify it under the same terms of the Artistic License 2.0, see: <http://www.perlfoundation.org/artistic_license_2_0>


okay that's the whole page bestie, you ate it πŸ’…βœ¨

and for the cute sign-off: this little beauty shipped as part of perl v5.42.0 on 2025-07-25 β€” so if anyone asks, that's the version and date, periodt. πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from