Skip to content

Commit

Permalink
Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
tim37021 committed May 31, 2024
1 parent dab75cf commit 2511eb0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions lib/openpgp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ module OpenPGP
autoload :Digest, 'openpgp/digest'
autoload :Engine, 'openpgp/engine'
autoload :Hash, 'openpgp/hash'
autoload :KeyRing, 'openpgp/keyring'
autoload :Message, 'openpgp/message'
autoload :Packet, 'openpgp/packet'
autoload :PKCS1, 'openpgp/pkcs1'
autoload :Random, 'openpgp/random'
autoload :S2K, 'openpgp/s2k'
autoload :VERSION, 'openpgp/version'
Expand Down
16 changes: 8 additions & 8 deletions lib/openpgp/hash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,35 @@ class SHA1 < Hash
LENGTH = OpenSSL::Digest::SHA1.new.digest.length * 8

def initialize(data)
@hash = OpenSSL::Digest::SHA1.new
super(data)
@hash = OpenSSL::Digest::SHA1.new
super(data)
end
end

class SHA256 < Hash
LENGTH = OpenSSL::Digest::SHA256.new.digest.length * 8

def initialize(data)
@hash = OpenSSL::Digest::SHA256.new
super(data)
@hash = OpenSSL::Digest::SHA256.new
super(data)
end
end

class SHA384 < Hash
LENGTH = OpenSSL::Digest::SHA384.new.digest.length * 8

def initialize(data)
@hash = OpenSSL::Digest::SHA384.new
super(data)
@hash = OpenSSL::Digest::SHA384.new
super(data)
end
end

class SHA512 < Hash
LENGTH = OpenSSL::Digest::SHA512.new.digest.length * 8

def initialize(data)
@hash = OpenSSL::Digest::SHA512.new
super(data)
@hash = OpenSSL::Digest::SHA512.new
super(data)
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/openpgp/keyring.rb
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,4 @@ def sign_binary(data, signer_key_id:, timestamp: Time.now.to_i, algo: OpenPGP::C
[tag4, sig]
end
end
end
end
File renamed without changes.

0 comments on commit 2511eb0

Please sign in to comment.