X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fshare%2Fkeytrans;h=e6777ffd4a35805d96cbd55ead27042cdbecd1f4;hb=5df09d935f33477cdd9763c0e9c1ba7c8073aea0;hp=d9830f40fa2692b9fc5b81bf9adc30e8c3118a66;hpb=12f30bbed9bb66ea561298259e42a198195235fc;p=monkeysphere.git diff --git a/src/share/keytrans b/src/share/keytrans index d9830f4..e6777ff 100755 --- a/src/share/keytrans +++ b/src/share/keytrans @@ -1,4 +1,4 @@ -#!/usr/bin/env perl -w -T +#!/usr/bin/perl -w -T # keytrans: this is an RSA key translation utility; it is capable of # transforming RSA keys (both public keys and secret keys) between @@ -195,11 +195,11 @@ my $keyserver_prefs = { nomodify => 0x80 ########### Math/Utility Functions ############## -# see the bottom of page 43 of RFC 4880 +# see the bottom of page 44 of RFC 4880 (http://tools.ietf.org/html/rfc4880#page-44) sub simple_checksum { my $bytes = shift; - return unpack("%32W*",$bytes) % 65536; + return unpack("%16C*",$bytes); } # calculate the multiplicative inverse of a mod b this is euclid's