Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/taskloop/extension/string_extension.rb
Instance Method Summary collapse
Instance Method Details
#sha1 ⇒ Object
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_32bit ⇒ Object
10 11 12 |
# File 'lib/taskloop/extension/string_extension.rb', line 10 def sha1_32bit sha1[0..31] end |
#sha1_8bit ⇒ Object
14 15 16 |
# File 'lib/taskloop/extension/string_extension.rb', line 14 def sha1_8bit sha1[0..8] end |