GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DATA::PRINTER::FILTER::DIGEST (3)

.ds Aq ’

NAME

Data::Printer::Filter::Digest - pretty-printing MD5, SHA and friends

CONTENTS

SYNOPSIS

In your program:



  use Data::Printer filters => {
    -external => [ Digest ],
  };



or, in your .dataprinter file:



  {
    filters => {
       -external => [ Digest ],
    },
  };



You can also setup color and display details:



  use Data::Printer
      filters => {
          -external => [ Digest ],
      },
      color   => {
          digest => bright_green,
      }
      digest => {
          show_class_name => 0,  # default.
          show_reset      => 1,  # default.
      },
  };



DESCRIPTION

This is a filter plugin for Data::Printer. It filters through several digest classes and displays their current value in hexadecimal format as a string.

    Parsed Modules

o Digest::Adler32
o Digest::MD2
o Digest::MD4
o Digest::MD5
o Digest::SHA
o Digest::SHA1
o Digest::Whirlpool
If you have any suggestions for more modules or better output, please let us know.

    Extra Options

Aside from the display color, there are a few other options to be customized via the digest option key:

show_class_name

Set this to true to display the class name right next to the hexadecimal digest. Default is 0 (false).

show_reset

If set to true (the default), the filter will add a [reset] tag after dumping an empty digest object. See the rationale below.

    Note on dumping Digest::* objects

The digest operation is effectively a destructive, read-once operation. Once it has been performed, most Digest::* objects are automatically reset and can be used to calculate another digest value.

This behaviour - or, rather, forgetting about this behaviour - is a common source of issues when working with Digests.

This Data::Printer filter will <B>notB> destroy your object. Instead, we work on a cloned version to display the hexdigest, leaving your original object untouched.

As another debugging convenience for developers, since the empty object will produce a digest even after being used, this filter adds by default a [reset] tag to indicate that the object is empty, in a ’reset’ state - i.e. its hexdigest is the same as the hexdigest of a new, empty object of that same class.

SEE ALSO

Data::Printer
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DATA::PRINTER::FILTER::DIGEST (3) 2015-05-29

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.