lib/universa/keys.rb in universa-3.12.6.1 vs lib/universa/keys.rb in universa-3.13.1.1
- old
+ new
@@ -77,15 +77,16 @@
def long_address
@long_address ||= get_long_address()
end
# Check signature
+ #
# @param [String] data as binary or normal string
# @param [Object] signature as binary string
- # @param [Object] hash_type to use
+ # @param [Object] hash_type to use (SHA256, SHA512, SHA3_384 and so on)
# @return true if it is ok
def verify(data, signature, hash_type = "SHA3_384")
- __getobj__.verify(data.force_encoding('binary'), signature, hash_type)
+ __getobj__.verify(data.force_encoding('binary'), signature.force_encoding('binary'), hash_type)
end
# @param [String] data binary or usual data string
# @return [String] binary string with encrypted data
def encrypt(data)