SCRIPTS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>

7-DAY TOP DOWNLOAD

#
Program
aircrack 1.0RC3
2,431
Scary Maze
2,003
JDownload 0.9
1,393
QuickPlay 3.8.4
1,339
Virtual Floppy Drive
2.1

1,314
szewo referer logger
3.0

1,308
Flash Flip Book
2.0.1

1,075
Netcat 0.7.1
947
DjVu 0.8.0.9
910
Scary Maze 2 1.1
813
Home / Scripts / Modules

DBIx-Class-DigestColumns

Download button


Downloads: 261  Add to download basket  Tell us about an update
User Rating:
Rated by:
Good (3.1/5)
21 user(s)
Developer:

License / Price:

Platforms:

Databases:

Language:

Last Updated:

Category:
Guillermo Roditi | More scripts
Other Free / Open Source License 
Windows / Linux / Mac OS / BSD / Solaris
N/A
Perl
June 11th, 2007, 10:09 GMT
C: \ Modules

 Read user reviews (0)  Add a review  Refer to a friend  Subscribe

 

DBIx-Class-DigestColumns description

 

DBIx-Class-DigestColumns component can be used to automatically insert a message digest of selected columns.

This DBIx::Class component can be used to automatically insert a message digest of selected columns. By default DigestColumns will use Digest::MD5 to insert a 128-bit hexadecimal message digest of the column value.

The length of the inserted string will be 32 and it will only contain characters from this set: '0'..'9' and 'a'..'f'.

If you would like to use a specific digest module to create your message digest, you can set "digest_algorithm":

__PACKAGE__->digest_algorithm('SHA-1');

Options added to add_column
digest_check_method => $method_name
By using the digest_check_method attribute when you declare a column you can create a check method for that column. The check method accepts a plain text string, performs the correct digest on it and returns a boolean value indicating whether this method matches the currently_stored value.

METHODS
digestcolumns

Calls "digest_columns", "digest_algorithm", and "digest_encoding" and "digest_auto" if the corresponding argument is defined.

register_column
Override the original register_column to handle the creation of check methods.

digest_columns
Takes a list of columns to be convert to a message digest during insert.

__PACKAGE__->digest_columns(qw/ password /);

digest_algorithm
Takes the name of a digest algorithm to be used to calculate the message digest.

__PACKAGE__->digest_algorithm('SHA-1');

If a suitible digest module could not be loaded an exception will be thrown.

digest_algorithm defaults to "MD5".

digest_encoding
Selects the encoding to use for the message digest.

__PACKAGE__->digest_encoding('base64');

digest_encoding defaults to "hex".

_get_digest_string $value
Handles the actual encoding of column values into digests. When given a $value it will return the digest string for that value. This is the method used by "_digest_column_values" So you can use it to create an identical digest if you need one for comparison (e.g. password authentication).

_digest_column_values
Go through the columns and digest the values that need it.

This method is called by insert and update when automatic digests are turned on. If dirty is enabled it will only digest the values of dirtied columns.

digest_auto

__PACKAGE__->digest_auto(1);

Turns on and off automatic digest columns. When on, this feature makes all UPDATEs and INSERTs automatically insert a message digest of selected columns.

The default is for digest_auto is to be on.

digest_dirty

__PACKAGE__->digest_dirty(1);

Turns on and off the limiting of automatic digests to only dirty columns. When on, only columns that have been dirtied will have their values digested during UPDATEs and INSERTs. If auto is set to off this option does nothing.

The default is for digest_dirty is to be off to mantain compatibility with older versions of this module.





TAGS:

message digest | hexadecimal message | database class | hexadecimal | message | digest



HTML code for linking to this page:


Go to top

Windows tabGames tabDrivers tabMac tabLinux tabScripts tabMobile tabHandheld tabGadgets tabNews tab

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   ENTER NEWS SITE   |   ENGLISH BOARD   |   ROMANIAN FORUM