.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Data::Printer::Filter::Digest 3pm" .TH Data::Printer::Filter::Digest 3pm "2017-10-14" "perl v5.26.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Data::Printer::Filter::Digest \- pretty\-printing MD5, SHA and friends .SH "SYNOPSIS" .IX Header "SYNOPSIS" In your program: .PP .Vb 3 \& use Data::Printer filters => { \& \-external => [ \*(AqDigest\*(Aq ], \& }; .Ve .PP or, in your \f(CW\*(C`.dataprinter\*(C'\fR file: .PP .Vb 5 \& { \& filters => { \& \-external => [ \*(AqDigest\*(Aq ], \& }, \& }; .Ve .PP You can also setup color and display details: .PP .Vb 12 \& use Data::Printer \& filters => { \& \-external => [ \*(AqDigest\*(Aq ], \& }, \& color => { \& digest => \*(Aqbright_green\*(Aq, \& } \& digest => { \& show_class_name => 0, # default. \& show_reset => 1, # default. \& }, \& }; .Ve .SH "DESCRIPTION" .IX Header "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. .SS "Parsed Modules" .IX Subsection "Parsed Modules" .IP "\(bu" 4 Digest::Adler32 .IP "\(bu" 4 Digest::MD2 .IP "\(bu" 4 Digest::MD4 .IP "\(bu" 4 Digest::MD5 .IP "\(bu" 4 Digest::SHA .IP "\(bu" 4 Digest::SHA1 .IP "\(bu" 4 Digest::Whirlpool .PP If you have any suggestions for more modules or better output, please let us know. .SS "Extra Options" .IX Subsection "Extra Options" Aside from the display color, there are a few other options to be customized via the \f(CW\*(C`digest\*(C'\fR option key: .PP \fIshow_class_name\fR .IX Subsection "show_class_name" .PP Set this to true to display the class name right next to the hexadecimal digest. Default is 0 (false). .PP \fIshow_reset\fR .IX Subsection "show_reset" .PP If set to true (the default), the filter will add a \f(CW\*(C`[reset]\*(C'\fR tag after dumping an empty digest object. See the rationale below. .SS "Note on dumping Digest::* objects" .IX Subsection "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. .PP This behaviour \- or, rather, forgetting about this behaviour \- is a common source of issues when working with Digests. .PP This Data::Printer filter will \fBnot\fR destroy your object. Instead, we work on a cloned version to display the hexdigest, leaving your original object untouched. .PP As another debugging convenience for developers, since the empty object will produce a digest even after being used, this filter adds by default a \f(CW\*(C`[reset]\*(C'\fR 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. .SH "SEE ALSO" .IX Header "SEE ALSO" Data::Printer