.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Crypt::Digest::SHA3_224 3pm" .TH Crypt::Digest::SHA3_224 3pm 2026-07-04 "perl v5.40.1" "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 Crypt::Digest::SHA3_224 \- Hash function SHA3\-224 [size: 224 bits] .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 3 \& ### Functional interface: \& use Crypt::Digest::SHA3_224 qw( sha3_224 sha3_224_hex sha3_224_b64 sha3_224_b64u \& sha3_224_file sha3_224_file_hex sha3_224_file_b64 sha3_224_file_b64u ); \& \& # calculate digest from string/buffer \& my $data = \*(Aqdata string\*(Aq; \& my $sha3_224_raw = sha3_224($data); \& my $sha3_224_hex = sha3_224_hex($data); \& my $sha3_224_b64 = sha3_224_b64($data); \& my $sha3_224_b64u = sha3_224_b64u($data); \& # or from file \& my $sha3_224_file_raw = sha3_224_file(\*(Aqfilename.dat\*(Aq); \& my $sha3_224_file_hex = sha3_224_file_hex(\*(Aqfilename.dat\*(Aq); \& my $sha3_224_file_b64 = sha3_224_file_b64(\*(Aqfilename.dat\*(Aq); \& my $sha3_224_file_b64u = sha3_224_file_b64u(\*(Aqfilename.dat\*(Aq); \& # or from filehandle \& my $filehandle = ...; # existing binary\-mode filehandle \& my $sha3_224_fh_raw = sha3_224_file($filehandle); \& my $sha3_224_fh_hex = sha3_224_file_hex($filehandle); \& my $sha3_224_fh_b64 = sha3_224_file_b64($filehandle); \& my $sha3_224_fh_b64u = sha3_224_file_b64u($filehandle); \& \& ### OO interface: \& use Crypt::Digest::SHA3_224; \& \& my $d = Crypt::Digest::SHA3_224\->new; \& $d\->add(\*(Aqany data\*(Aq); \& my $result_raw = $d\->digest; # raw bytes \& my $result_hex = $d\->hexdigest; # hexadecimal form \& my $result_b64 = $d\->b64digest; # Base64 form \& my $result_b64u = $d\->b64udigest; # Base64 URL\-safe form \& \& # or hash a file instead \& my $file_result_raw = Crypt::Digest::SHA3_224\->new\->addfile(\*(Aqfilename.dat\*(Aq)\->digest; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fISince: CryptX\-0.048\fR .PP Provides an interface to the SHA3_224 digest algorithm. .SH EXPORT .IX Header "EXPORT" Nothing is exported by default. .PP You can export selected functions: .PP .Vb 2 \& use Crypt::Digest::SHA3_224 qw(sha3_224 sha3_224_hex sha3_224_b64 sha3_224_b64u \& sha3_224_file sha3_224_file_hex sha3_224_file_b64 sha3_224_file_b64u); .Ve .PP Or all of them at once: .PP .Vb 1 \& use Crypt::Digest::SHA3_224 \*(Aq:all\*(Aq; .Ve .SH FUNCTIONS .IX Header "FUNCTIONS" .SS sha3_224 .IX Subsection "sha3_224" Joins all arguments into a single string and returns its SHA3_224 digest encoded as a binary string. .PP Data arguments for the functional helpers are converted to byte strings using Perl's usual scalar stringification. Defined scalars, including numbers and string-overloaded objects, are accepted. \f(CW\*(C`undef\*(C'\fR is treated as an empty string and may emit Perl's usual "uninitialized value" warning. The same rules apply to \f(CW\*(C`sha3_224_hex\*(C'\fR, \f(CW\*(C`sha3_224_b64\*(C'\fR, and \&\f(CW\*(C`sha3_224_b64u\*(C'\fR. .PP .Vb 3 \& my $sha3_224_raw = sha3_224(\*(Aqdata string\*(Aq); \& #or \& my $sha3_224_raw = sha3_224(\*(Aqany data\*(Aq, \*(Aqmore data\*(Aq, \*(Aqeven more data\*(Aq); .Ve .SS sha3_224_hex .IX Subsection "sha3_224_hex" Joins all arguments into a single string and returns its SHA3_224 digest encoded as a hexadecimal string. .PP .Vb 3 \& my $sha3_224_hex = sha3_224_hex(\*(Aqdata string\*(Aq); \& #or \& my $sha3_224_hex = sha3_224_hex(\*(Aqany data\*(Aq, \*(Aqmore data\*(Aq, \*(Aqeven more data\*(Aq); .Ve .SS sha3_224_b64 .IX Subsection "sha3_224_b64" Joins all arguments into a single string and returns its SHA3_224 digest encoded as a Base64 string, \fBwith\fR trailing '=' padding. .PP .Vb 3 \& my $sha3_224_b64 = sha3_224_b64(\*(Aqdata string\*(Aq); \& #or \& my $sha3_224_b64 = sha3_224_b64(\*(Aqany data\*(Aq, \*(Aqmore data\*(Aq, \*(Aqeven more data\*(Aq); .Ve .SS sha3_224_b64u .IX Subsection "sha3_224_b64u" Joins all arguments into a single string and returns its SHA3_224 digest encoded as a Base64 URL-safe string (see RFC 4648 section 5). .PP .Vb 3 \& my $sha3_224_b64url = sha3_224_b64u(\*(Aqdata string\*(Aq); \& #or \& my $sha3_224_b64url = sha3_224_b64u(\*(Aqany data\*(Aq, \*(Aqmore data\*(Aq, \*(Aqeven more data\*(Aq); .Ve .SS sha3_224_file .IX Subsection "sha3_224_file" Reads a file given by a filename or filehandle and returns its SHA3_224 digest encoded as a binary string. .PP .Vb 4 \& my $sha3_224_raw = sha3_224_file(\*(Aqfilename.dat\*(Aq); \& #or \& my $filehandle = ...; # existing binary\-mode filehandle \& my $sha3_224_raw = sha3_224_file($filehandle); .Ve .SS sha3_224_file_hex .IX Subsection "sha3_224_file_hex" Reads a file given by a filename or filehandle and returns its SHA3_224 digest encoded as a hexadecimal string. .PP .Vb 4 \& my $sha3_224_hex = sha3_224_file_hex(\*(Aqfilename.dat\*(Aq); \& #or \& my $filehandle = ...; # existing binary\-mode filehandle \& my $sha3_224_hex = sha3_224_file_hex($filehandle); .Ve .PP \&\fBNote:\fR The filehandle must be in binary mode before you pass it to \f(CWaddfile()\fR. .SS sha3_224_file_b64 .IX Subsection "sha3_224_file_b64" Reads a file given by a filename or filehandle and returns its SHA3_224 digest encoded as a Base64 string, \fBwith\fR trailing '=' padding. .PP .Vb 4 \& my $sha3_224_b64 = sha3_224_file_b64(\*(Aqfilename.dat\*(Aq); \& #or \& my $filehandle = ...; # existing binary\-mode filehandle \& my $sha3_224_b64 = sha3_224_file_b64($filehandle); .Ve .SS sha3_224_file_b64u .IX Subsection "sha3_224_file_b64u" Reads a file given by a filename or filehandle and returns its SHA3_224 digest encoded as a Base64 URL-safe string (see RFC 4648 section 5). .PP .Vb 4 \& my $sha3_224_b64url = sha3_224_file_b64u(\*(Aqfilename.dat\*(Aq); \& #or \& my $filehandle = ...; # existing binary\-mode filehandle \& my $sha3_224_b64url = sha3_224_file_b64u($filehandle); .Ve .SH METHODS .IX Header "METHODS" The OO interface provides the same set of functions as Crypt::Digest. Unless noted otherwise, assume \f(CW$d\fR is an existing digest object created via \&\f(CW\*(C`new\*(C'\fR, for example: .PP .Vb 1 \& my $d = Crypt::Digest::SHA3_224\->new(); .Ve .SS new .IX Subsection "new" .Vb 1 \& my $d = Crypt::Digest::SHA3_224\->new(); .Ve .SS clone .IX Subsection "clone" .Vb 1 \& $d\->clone(); .Ve .SS reset .IX Subsection "reset" .Vb 1 \& $d\->reset(); .Ve .SS add .IX Subsection "add" Appends data to the message. Returns the object itself (for chaining). .PP Each argument is converted to bytes using Perl's usual scalar stringification. Defined scalars, including numbers and string-overloaded objects, are accepted. \f(CW\*(C`undef\*(C'\fR is treated as an empty string and may emit Perl's usual "uninitialized value" warning. .PP .Vb 3 \& $d\->add(\*(Aqany data\*(Aq); \& #or \& $d\->add(\*(Aqany data\*(Aq, \*(Aqmore data\*(Aq, \*(Aqeven more data\*(Aq); .Ve .SS addfile .IX Subsection "addfile" Reads the file content and appends it to the message. Returns the object itself (for chaining). .PP .Vb 4 \& $d\->addfile(\*(Aqfilename.dat\*(Aq); \& #or \& my $filehandle = ...; # existing binary\-mode filehandle \& $d\->addfile($filehandle); .Ve .SS hashsize .IX Subsection "hashsize" .Vb 5 \& $d\->hashsize; \& #or \& Crypt::Digest::SHA3_224\->hashsize(); \& #or \& Crypt::Digest::SHA3_224::hashsize(); .Ve .SS digest .IX Subsection "digest" Returns the binary digest (raw bytes). The first call finalizes the digest object. Any later \f(CWadd()\fR, \&\f(CWaddfile()\fR, \f(CWdigest()\fR, \f(CWhexdigest()\fR, \f(CWb64digest()\fR, or \&\f(CWb64udigest()\fR call will fail until you call \f(CWreset()\fR. .PP .Vb 1 \& my $result_raw = $d\->digest(); .Ve .SS hexdigest .IX Subsection "hexdigest" Returns the digest encoded as a lowercase hexadecimal string. Like \f(CWdigest()\fR, the first call finalizes the digest object. .PP .Vb 1 \& my $result_hex = $d\->hexdigest(); .Ve .SS b64digest .IX Subsection "b64digest" Returns the digest encoded as a Base64 string with trailing \f(CW\*(C`=\*(C'\fR padding. Like \f(CWdigest()\fR, the first call finalizes the digest object. .PP .Vb 1 \& my $result_b64 = $d\->b64digest(); .Ve .SS b64udigest .IX Subsection "b64udigest" Returns the digest encoded as a Base64 URL-safe string (no trailing \f(CW\*(C`=\*(C'\fR). Like \f(CWdigest()\fR, the first call finalizes the digest object. .PP .Vb 1 \& my $result_b64url = $d\->b64udigest(); .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" .IP \(bu 4 CryptX, Crypt::Digest .IP \(bu 4