.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man v6.0.2 (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
.\"
.\" Required to disable full justification in groff 1.23.0.
.if n .ds AD l
.\" ========================================================================
.\"
.IX Title "Crypt::Digest::BLAKE2b_384 3"
.TH Crypt::Digest::BLAKE2b_384 3 2026-05-12 "perl v5.42.2" "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::BLAKE2b_384 \- Hash function BLAKE2b [size: 384 bits]
.SH SYNOPSIS
.IX Header "SYNOPSIS"
.Vb 3
\& ### Functional interface:
\& use Crypt::Digest::BLAKE2b_384 qw( blake2b_384 blake2b_384_hex blake2b_384_b64 blake2b_384_b64u
\& blake2b_384_file blake2b_384_file_hex blake2b_384_file_b64 blake2b_384_file_b64u );
\&
\& # calculate digest from string/buffer
\& my $data = \*(Aqdata string\*(Aq;
\& my $blake2b_384_raw = blake2b_384($data);
\& my $blake2b_384_hex = blake2b_384_hex($data);
\& my $blake2b_384_b64 = blake2b_384_b64($data);
\& my $blake2b_384_b64u = blake2b_384_b64u($data);
\& # or from file
\& my $blake2b_384_file_raw = blake2b_384_file(\*(Aqfilename.dat\*(Aq);
\& my $blake2b_384_file_hex = blake2b_384_file_hex(\*(Aqfilename.dat\*(Aq);
\& my $blake2b_384_file_b64 = blake2b_384_file_b64(\*(Aqfilename.dat\*(Aq);
\& my $blake2b_384_file_b64u = blake2b_384_file_b64u(\*(Aqfilename.dat\*(Aq);
\& # or from filehandle
\& my $filehandle = ...; # existing binary\-mode filehandle
\& my $blake2b_384_fh_raw = blake2b_384_file($filehandle);
\& my $blake2b_384_fh_hex = blake2b_384_file_hex($filehandle);
\& my $blake2b_384_fh_b64 = blake2b_384_file_b64($filehandle);
\& my $blake2b_384_fh_b64u = blake2b_384_file_b64u($filehandle);
\&
\& ### OO interface:
\& use Crypt::Digest::BLAKE2b_384;
\&
\& my $d = Crypt::Digest::BLAKE2b_384\->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::BLAKE2b_384\->new\->addfile(\*(Aqfilename.dat\*(Aq)\->digest;
.Ve
.SH DESCRIPTION
.IX Header "DESCRIPTION"
Provides an interface to the BLAKE2b_384 digest algorithm.
.SH EXPORT
.IX Header "EXPORT"
Nothing is exported by default.
.PP
You can export selected functions:
.PP
.Vb 2
\& use Crypt::Digest::BLAKE2b_384 qw(blake2b_384 blake2b_384_hex blake2b_384_b64 blake2b_384_b64u
\& blake2b_384_file blake2b_384_file_hex blake2b_384_file_b64 blake2b_384_file_b64u);
.Ve
.PP
Or all of them at once:
.PP
.Vb 1
\& use Crypt::Digest::BLAKE2b_384 \*(Aq:all\*(Aq;
.Ve
.SH FUNCTIONS
.IX Header "FUNCTIONS"
.SS blake2b_384
.IX Subsection "blake2b_384"
Joins all arguments into a single string and returns its BLAKE2b_384 digest encoded as a binary string.
.PP
Data arguments for the functional helpers are converted to byte strings using
Perl\*(Aqs 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\*(Aqs usual "uninitialized value" warning. The same
rules apply to \f(CW\*(C`blake2b_384_hex\*(C'\fR, \f(CW\*(C`blake2b_384_b64\*(C'\fR, and
\&\f(CW\*(C`blake2b_384_b64u\*(C'\fR.
.PP
.Vb 3
\& my $blake2b_384_raw = blake2b_384(\*(Aqdata string\*(Aq);
\& #or
\& my $blake2b_384_raw = blake2b_384(\*(Aqany data\*(Aq, \*(Aqmore data\*(Aq, \*(Aqeven more data\*(Aq);
.Ve
.SS blake2b_384_hex
.IX Subsection "blake2b_384_hex"
Joins all arguments into a single string and returns its BLAKE2b_384 digest encoded as a hexadecimal string.
.PP
.Vb 3
\& my $blake2b_384_hex = blake2b_384_hex(\*(Aqdata string\*(Aq);
\& #or
\& my $blake2b_384_hex = blake2b_384_hex(\*(Aqany data\*(Aq, \*(Aqmore data\*(Aq, \*(Aqeven more data\*(Aq);
.Ve
.SS blake2b_384_b64
.IX Subsection "blake2b_384_b64"
Joins all arguments into a single string and returns its BLAKE2b_384 digest encoded as a Base64 string, \fBwith\fR trailing \*(Aq=\*(Aq padding.
.PP
.Vb 3
\& my $blake2b_384_b64 = blake2b_384_b64(\*(Aqdata string\*(Aq);
\& #or
\& my $blake2b_384_b64 = blake2b_384_b64(\*(Aqany data\*(Aq, \*(Aqmore data\*(Aq, \*(Aqeven more data\*(Aq);
.Ve
.SS blake2b_384_b64u
.IX Subsection "blake2b_384_b64u"
Joins all arguments into a single string and returns its BLAKE2b_384 digest encoded as a Base64 URL\-safe string (see RFC 4648 section 5).
.PP
.Vb 3
\& my $blake2b_384_b64url = blake2b_384_b64u(\*(Aqdata string\*(Aq);
\& #or
\& my $blake2b_384_b64url = blake2b_384_b64u(\*(Aqany data\*(Aq, \*(Aqmore data\*(Aq, \*(Aqeven more data\*(Aq);
.Ve
.SS blake2b_384_file
.IX Subsection "blake2b_384_file"
Reads a file given by a filename or filehandle and returns its BLAKE2b_384 digest encoded as a binary string.
.PP
.Vb 4
\& my $blake2b_384_raw = blake2b_384_file(\*(Aqfilename.dat\*(Aq);
\& #or
\& my $filehandle = ...; # existing binary\-mode filehandle
\& my $blake2b_384_raw = blake2b_384_file($filehandle);
.Ve
.SS blake2b_384_file_hex
.IX Subsection "blake2b_384_file_hex"
Reads a file given by a filename or filehandle and returns its BLAKE2b_384 digest encoded as a hexadecimal string.
.PP
.Vb 4
\& my $blake2b_384_hex = blake2b_384_file_hex(\*(Aqfilename.dat\*(Aq);
\& #or
\& my $filehandle = ...; # existing binary\-mode filehandle
\& my $blake2b_384_hex = blake2b_384_file_hex($filehandle);
.Ve
.PP
\&\fBNote:\fR The filehandle must be in binary mode before you pass it to \f(CWaddfile()\fR.
.SS blake2b_384_file_b64
.IX Subsection "blake2b_384_file_b64"
Reads a file given by a filename or filehandle and returns its BLAKE2b_384 digest encoded as a Base64 string, \fBwith\fR trailing \*(Aq=\*(Aq padding.
.PP
.Vb 4
\& my $blake2b_384_b64 = blake2b_384_file_b64(\*(Aqfilename.dat\*(Aq);
\& #or
\& my $filehandle = ...; # existing binary\-mode filehandle
\& my $blake2b_384_b64 = blake2b_384_file_b64($filehandle);
.Ve
.SS blake2b_384_file_b64u
.IX Subsection "blake2b_384_file_b64u"
Reads a file given by a filename or filehandle and returns its BLAKE2b_384 digest encoded as a Base64 URL\-safe string (see RFC 4648 section 5).
.PP
.Vb 4
\& my $blake2b_384_b64url = blake2b_384_file_b64u(\*(Aqfilename.dat\*(Aq);
\& #or
\& my $filehandle = ...; # existing binary\-mode filehandle
\& my $blake2b_384_b64url = blake2b_384_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::BLAKE2b_384\->new();
.Ve
.SS new
.IX Subsection "new"
.Vb 1
\& my $d = Crypt::Digest::BLAKE2b_384\->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\*(Aqs 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\*(Aqs 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::BLAKE2b_384\->hashsize();
\& #or
\& Crypt::Digest::BLAKE2b_384::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
.IP \(bu 4