Changeset 39
- Timestamp:
- 06/10/06 13:13:13 (2 years ago)
- Files:
-
- trunk/lib/pgp/packet/signature.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/pgp/packet/signature.rb
r18 r39 105 105 def unhashedsubpacket 106 106 @unhashedsubpacket 107 end 108 109 def verify(pubkey, target) 110 packed_decoded_hash = MPI.to_bytes(pubkey.decrypt(@signature)) 111 decoded_hash = PKeyAlgorithm.decode_hash(@pkey_algorithm, pubkey.nbits, 112 @hash_algorithm, packed_decoded_hash) 113 114 hashed_body = dump_version + dump_signature_type + dump_pkey_algorithm + 115 dump_hash_algorithm + dump_hashedsubpacket 116 calced_hash = calc_hash(target + dump_hash_magic(hashed_body)) 117 118 decoded_hash == calced_hash 107 119 end 108 120