Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 7c0f1ab150
Fetching contributors…

Cannot retrieve contributors at this time

12 lines (10 sloc) 0.212 kB
require "string_to_sha1/version"
require "digest/sha1"
class String
# Convert string to its SHA1 representation
#
# @return [String] SHA1 of string
def to_sha1
Digest::SHA1.hexdigest(self)
end
end
Jump to Line
Something went wrong with that request. Please try again.