Fingerprint tests

This commit is contained in:
Stephen Paul Weber
2013-01-20 17:51:37 -05:00
parent f4af8a010b
commit 995a9d7840
3 changed files with 29 additions and 2 deletions

View File

@@ -1193,9 +1193,9 @@ class OpenPGP_PublicKeyPacket extends OpenPGP_Packet {
switch ($this->version) {
case 2:
case 3:
return $this->fingerprint = md5(implode('', $this->fingerprint_material()));
return $this->fingerprint = strtoupper(md5(implode('', $this->fingerprint_material())));
case 4:
return $this->fingerprint = sha1(implode('', $this->fingerprint_material()));
return $this->fingerprint = strtoupper(sha1(implode('', $this->fingerprint_material())));
}
}