Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/taskloop/extension/string_extension.rb

Instance Method Summary collapse

Instance Method Details

#sha1Object



4
5
6
7
8
# File 'lib/taskloop/extension/string_extension.rb', line 4

def sha1
  sha1_digest = Digest::SHA1.new
  sha1_digest.update(self)
  return sha1_digest.hexdigest
end

#sha1_32bitObject



10
11
12
# File 'lib/taskloop/extension/string_extension.rb', line 10

def sha1_32bit
  sha1[0..31]
end

#sha1_8bitObject



14
15
16
# File 'lib/taskloop/extension/string_extension.rb', line 14

def sha1_8bit
  sha1[0..8]
end