Land #21, add SHA2 digest wrappers

This commit is contained in:
Brent Cook 2018-06-13 17:30:30 -05:00
commit 6ef2d31833
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
1 changed files with 14 additions and 0 deletions

View File

@ -33,5 +33,19 @@ module Rex
def self.sha1(str)
Digest::SHA1.hexdigest(str)
end
#
# Raw SHA2 digest of the supplied string
#
def self.sha2_raw(str)
Digest::SHA2.digest(str)
end
#
# Hexidecimal SHA2 digest of the supplied string
#
def self.sha2(str)
Digest::SHA2.hexdigest(str)
end
end
end