DBIx-Class-DigestColumns Perl script

SPONSORED LINKS

    Specification

  • Version:
  • File size: 0 KB
  • File name: DBIx-Class-DigestColumns-0.06000.tar.gz
  • Last update:
  • Platform: Windows / Linux / Mac OS / BSD / Solaris
  • Language: Perl
  • Price:Other Free / Open So
  • Company: Guillermo Roditi (View more)

DBIx-Class-DigestColumns script description:




Publisher review:
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_columndigest_check_method => $method_nameBy 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.

METHODSdigestcolumns

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

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

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

__PACKAGE__->digest_columns(qw/ password /);

digest_algorithmTakes 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_encodingSelects the encoding to use for the message digest.

__PACKAGE__->digest_encoding('base64');

digest_encoding defaults to "hex".

_get_digest_string $valueHandles 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_valuesGo 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.
DBIx-Class-DigestColumns is a Perl script for Modules scripts design by Guillermo Roditi. It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
DBIx-Class-DigestColumns component can be used to automatically insert a message digest of selected columns.

Operating system:
Windows / Linux / Mac OS / BSD / Solaris

Latest script and internet news

222

222

22

Posted on: 18 Jul 2023 22:27 by A. Brown

111

111

111

Posted on: 18 Jul 2023 22:24 by A. Brown

The permanently active Push system offered by the new Google Chrome 42

The permanently active Push system offered by the new Google Chrome 42

Hacked By !Sc-sT

Posted on: 17 Mar 2015 07:57 by A. Brown

SPREAD THE WORD

User Rating


Rating: 2.2 out of 5
Based on 13 ratings. 13 user reviews.

  • Currently 2.15 out of 5
  • 1
  • 2
  • 3
  • 4
  • 5