Update contrib.
2 # Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
4 # This component and the accompanying materials are made available
5 # under the terms of the License "Eclipse Public License v1.0"
6 # which accompanies this distribution, and is available
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 # Initial Contributors:
10 # Nokia Corporation - initial contribution.
17 package Digest::HMAC_MD2;
21 use Digest::MD2 qw(md2);
22 use Digest::HMAC qw(hmac);
26 @ISA=qw(Digest::HMAC);
30 $class->SUPER::new($_[0], "Digest::MD2", 16);
33 # Functional interface
35 *import = \&Exporter::import;
36 use vars qw(@EXPORT_OK);
37 @EXPORT_OK=qw(hmac_md2 hmac_md2_hex);
41 hmac($_[0], $_[1], \&md2, 16);
46 unpack("H*", &hmac_md2)
55 Digest::HMAC_MD2 - Keyed-Hashing for Message Authentication
60 use Digest::HMAC_MD2 qw(hmac_md2 hmac_md2_hex);
61 $digest = hmac_md2($data, $key);
62 print hmac_md2_hex($data, $key);
66 $hmac = Digest::HMAC_MD2->new($key);
69 $hmac->addfile(*FILE);
71 $digest = $hmac->digest;
72 $digest = $hmac->hexdigest;
73 $digest = $hmac->b64digest;
77 This module provide HMAC-MD2 hashing.
81 L<Digest::HMAC>, L<Digest::MD2>, L<Digest::HMAC_SHA1>
85 Jon Thackray, from Gisle Aas <gisle@aas.no>'s MD5 code