.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" 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 .. .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::DES_EDE3 3pm" .TH Crypt::DES_EDE3 3pm "2022-05-28" "perl v5.34.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" Crypt::DES_EDE3 \- Triple\-DES EDE encryption/decryption .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& use Crypt::DES_EDE3; \& my $ede3 = Crypt::DES_EDE3\->new($key); \& $ede3\->encrypt($block); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fICrypt::DES_EDE3\fR implements \s-1DES\-EDE3\s0 encryption. This is triple-DES encryption where an encrypt operation is encrypt-decrypt-encrypt, and decrypt is decrypt-encrypt-decrypt. This implementation uses \fICrypt::DES\fR to do its dirty \s-1DES\s0 work, and simply provides a wrapper around that module: setting up the individual \s-1DES\s0 ciphers, initializing the keys, and performing the encryption/decryption steps. .PP \&\s-1DES\-EDE3\s0 encryption requires a key size of 24 bytes. .PP You're probably best off not using this module directly, as the \fIencrypt\fR and \fIdecrypt\fR methods expect 8\-octet blocks. You might want to use the module in conjunction with \fICrypt::CBC\fR, for example. This would be \&\s-1DES\-EDE3\-CBC,\s0 or triple-DES in outer \s-1CBC\s0 mode. .SH "USAGE" .IX Header "USAGE" .ie n .SS "$ede3 = Crypt::DES_EDE3\->new($key)" .el .SS "\f(CW$ede3\fP = Crypt::DES_EDE3\->new($key)" .IX Subsection "$ede3 = Crypt::DES_EDE3->new($key)" Creates a new \fICrypt::DES_EDE3\fR object (really, a collection of three \s-1DES\s0 ciphers), and initializes each cipher with part of \fI\f(CI$key\fI\fR, which should be at least 24 bytes. If it's longer than 24 bytes, the extra bytes will be ignored. .PP Returns the new object. .ie n .SS "$ede3\->encrypt($block)" .el .SS "\f(CW$ede3\fP\->encrypt($block)" .IX Subsection "$ede3->encrypt($block)" Encrypts an 8\-byte block of data \fI\f(CI$block\fI\fR using the three \s-1DES\s0 ciphers in an encrypt-decrypt-encrypt operation. .PP Returns the encrypted block. .ie n .SS "$ede3\->decrypt($block)" .el .SS "\f(CW$ede3\fP\->decrypt($block)" .IX Subsection "$ede3->decrypt($block)" Decrypts an 8\-byte block of data \fI\f(CI$block\fI\fR using the three \s-1DES\s0 ciphers in a decrypt-encrypt-decrypt operation. .PP Returns the decrypted block. .ie n .SS "$ede3\->blocksize" .el .SS "\f(CW$ede3\fP\->blocksize" .IX Subsection "$ede3->blocksize" Returns the block size (8). .ie n .SS "$ede3\->keysize" .el .SS "\f(CW$ede3\fP\->keysize" .IX Subsection "$ede3->keysize" Returns the key size (24). .SH "LICENSE" .IX Header "LICENSE" Crypt::DES_EDE3 is free software; you may redistribute it and/or modify it under the same terms as Perl itself. .SH "AUTHOR & COPYRIGHTS" .IX Header "AUTHOR & COPYRIGHTS" Crypt::DES_EDE3 is Copyright 2001 Benjamin Trott, ben@rhumba.pair.com. All rights reserved.