summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-12-31 11:31:04 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-12-31 11:31:04 +0000
commit1aa76fc06be537ecacac577d1a29c3bab878a2c4 (patch)
tree5864d6322ea1b5bb8da870766e3a248cfa1b7d5c /usr.sbin
parent41448c9d98d2bbcafd23a756ec26f7a99f1145fd (diff)
sha256 is the common case, no need to delay loading.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/md5.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/md5.pm b/usr.sbin/pkg_add/OpenBSD/md5.pm
index 6a89f47c5fb..90d84fbb1a5 100644
--- a/usr.sbin/pkg_add/OpenBSD/md5.pm
+++ b/usr.sbin/pkg_add/OpenBSD/md5.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: md5.pm,v 1.7 2008/10/06 09:36:17 espie Exp $
+# $OpenBSD: md5.pm,v 1.8 2009/12/31 11:31:03 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -111,10 +111,12 @@ sub keyword
package OpenBSD::sha;
our @ISA=(qw(OpenBSD::digest));
+use Digest::SHA;
+use MIME::Base64;
+
sub algo
{
my $self = shift;
- require Digest::SHA;
return Digest::SHA->new(256);
}
@@ -122,17 +124,15 @@ sub algo
sub stringize
{
my $self = shift;
- require MIME::Base64;
- return MIME::Base64::encode_base64($$self, '');
+ return encode_base64($$self, '');
}
sub unstringize
{
my ($class, $arg) = @_;
- require MIME::Base64;
- return MIME::Base64::decode_base64($arg);
+ return decode_base64($arg);
}
sub keyword