hashsum 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/hashsum.rb +11 -0
  3. metadata +45 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8e71ff4c251c30815b02f0854e34ff29cfb9785e
4
+ data.tar.gz: 36730b5f8c6b62dbbbbb55c1dbea0f516d80eb15
5
+ SHA512:
6
+ metadata.gz: 07f6e70b80d519a2cdb5d89920e4274b50048298e34ed89aeb7f484142428540cc217c714cfad4358963ca45e1e8437243c3b523316e14663c0779dd88dc77fc
7
+ data.tar.gz: e14689230f86ebf33ac014c45c9ea0bfcf6a23ffbb461490680e15589c5462640477abd6d4d3eb748918233e7f459f43a20030e78c3b9c95ce1fd05f5d43156c
data/lib/hashsum.rb ADDED
@@ -0,0 +1,11 @@
1
+ class String
2
+ def to_md5(salt = "")
3
+ Digest::MD5.hexdigest(salt+self)
4
+ end
5
+ def to_sha1(salt = "")
6
+ Digest::SHA1.hexdigest(salt+self)
7
+ end
8
+ def to_sha2(salt = "")
9
+ Digest::SHA2.hexdigest(salt+self)
10
+ end
11
+ end
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hashsum
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Francesco Russo
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-09-16 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Add hashing methods to String class
14
+ email: fraskyrusso@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/hashsum.rb
20
+ homepage: http://rubygems.org/gems/hashsum
21
+ licenses:
22
+ - MIT
23
+ - GPL
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubyforge_project:
41
+ rubygems_version: 2.0.6
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: Hashsum
45
+ test_files: []