Sha256: ecce1498a325036ab3db1cdda915e21e3405bcee37d0b2319211ebc9723f4cbf
Contents?: true
Size: 621 Bytes
Versions: 18
Compression:
Stored size: 621 Bytes
Contents
#-- # Author:: Tyler Rick # Copyright:: Copyright (c) 2007 QualitySmith, Inc. # License:: Ruby License # Submit to Facets?:: Yes #++ require "digest/md5" class String # Because it's so much more natural to have this as a method of the string rather than having to call <tt>Digest::MD5.hexdigest(string)</tt>. def md5 return Digest::MD5.hexdigest(self) end end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test class TheTest < Test::Unit::TestCase def test_md5 assert_equal "abc".md5, Digest::MD5.hexdigest("abc") end end =end
Version data entries
18 entries across 18 versions & 2 rubygems