T. Linden > Crypt-PWSafe3-1.14 > Crypt::PWSafe3::Record

Download:
Crypt-PWSafe3-1.14.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 1.07   Source  

NAME ^

Crypt::PWSafe3::Record - Represents a Passwordsafe v3 data record

SYNOPSIS ^

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

DESCRIPTION ^

Crypt::PWSafe3::Record represents a Passwordsafe v3 data record. Each record consists of a number of fields of type Crypt::PWSafe3::Field. The class provides get/set methods to access the values of those fields.

It is also possible to access the raw unencoded values of the fields by accessing them directly, refer to Crypt::PWSafe3::Field for more details on this.

METHODS ^

uuid([string])

Returns the UUID without argument. Sets the UUID if an argument is given. Must be a hex representation of an Data::UUID object.

This will be generated automatically for new records, so you normally don't have to cope with.

user([string])

Returns the username without argument. Sets the username if an argument is given.

title([string])

Returns the title without argument. Sets the title if an argument is given.

passwd([string])

Returns the password without argument. Sets the password if an argument is given.

notes([string])

Returns the notes without argument. Sets the notes if an argument is given.

group([string])

Returns the group without argument. Sets the group if an argument is given.

Group hierarchy can be done by separating subgroups by dot, eg:

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

ctime([time_t])

Returns the creation time without argument. Sets the creation time if an argument is given. Argument must be an integer timestamp as returned by time().

This will be generated automatically for new records, so you normally don't have to cope with.

atime([time_t])

Returns the access time without argument. Sets the access time if an argument is given. Argument must be an integer timestamp as returned by time().

Crypt::PWSafe3 doesn't update the atime field currently. So if you mind, do it yourself.

mtime([time_t])

Returns the modification time of the passwd field without argument. Sets the modification time if an argument is given. Argument must be an integer timestamp as returned by time().

This will be generated automatically for modified records if the passwd field changed, so you normally don't have to cope with.

lastmod([string])

Returns the modification time without argument. Sets the modification time if an argument is given. Argument must be an integer timestamp as returned by time().

This will be generated automatically for modified records, so you normally don't have to cope with.

url([string])

Returns the url without argument. Sets the url if an argument is given. The url must be in the well known notation as:

 proto://host/path

pwhist([string])

Returns the password history without argument. Sets the password history if an argument is given.

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])

Returns the password policy without argument. Sets the password policy if an argument is given.

This is the raw encoded policy string. If you want to access it, use the policy() method, see below.

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

If called without arguments, returns a Crypt::PWSafe3::PasswordPolicy object. See Crypt::PWSafe3::PasswordPolicy for details, how to access it.

To modify the password policy, create new Crypt::PWSafe3::PasswordPolicy object or modify the existing one and pass it as argument to the policy method.

pwexp([string])

Returns the password expire time without argument. Sets the password expire time if an argument is given.

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:

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 current time of creation time.

SEE ALSO ^

Crypt::PWSafe3

AUTHOR ^

T. Linden <tlinden@cpan.org>

COPYRIGHT ^

Copyright (c) 2011-2013 by T.Linden <tlinden@cpan.org>. All rights reserved.

LICENSE ^

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

syntax highlighting: