-102
-103
-104
+104
+105
+106
- # File 'lib/ctf_party/digest.rb', line 102
+ # File 'lib/ctf_party/digest.rb', line 104
def rmd160
Digest::RMD160.hexdigest self
@@ -1854,12 +2592,12 @@
-112
-113
-114
+114
+115
+116
|
- # File 'lib/ctf_party/digest.rb', line 112
+ # File 'lib/ctf_party/digest.rb', line 114
def rmd160!
replace(rmd160)
@@ -2239,7 +2977,10 @@
- Calculate the sha1 hash of the string in place as described for #sha1.
+ Calculate the sha1 hash of the string in place as described for
+
+ {String#sha1}.
+
@@ -2263,12 +3004,12 @@
-39
40
-41
+41
+42
|
- # File 'lib/ctf_party/digest.rb', line 39
+ # File 'lib/ctf_party/digest.rb', line 40
def sha1!
replace(sha1)
@@ -2382,13 +3123,13 @@
-53
54
55
-56
+56
+57
|
- # File 'lib/ctf_party/digest.rb', line 53
+ # File 'lib/ctf_party/digest.rb', line 54
def sha2(opts = {})
opts[:bitlen] ||= 256
@@ -2411,7 +3152,10 @@
- Calculate the sha2 hash of the string in place as described for #sha2.
+ Calculate the sha2 hash of the string in place as described for
+
+ {String#sha2}.
+
@@ -2435,12 +3179,12 @@
-63
-64
-65
+65
+66
+67
|
- # File 'lib/ctf_party/digest.rb', line 63
+ # File 'lib/ctf_party/digest.rb', line 65
def sha2!(opts = {})
replace(sha2(opts))
@@ -2476,12 +3220,12 @@
-68
-69
-70
+70
+71
+72
|
- # File 'lib/ctf_party/digest.rb', line 68
+ # File 'lib/ctf_party/digest.rb', line 70
def sha2_256
sha2
@@ -2517,12 +3261,12 @@
-73
-74
-75
+75
+76
+77
|
- # File 'lib/ctf_party/digest.rb', line 73
+ # File 'lib/ctf_party/digest.rb', line 75
def sha2_256!
replace(sha2)
@@ -2558,12 +3302,12 @@
-78
-79
-80
+80
+81
+82
|
- # File 'lib/ctf_party/digest.rb', line 78
+ # File 'lib/ctf_party/digest.rb', line 80
def sha2_384
sha2(bitlen: 384)
@@ -2599,12 +3343,12 @@
-83
-84
-85
+85
+86
+87
|
- # File 'lib/ctf_party/digest.rb', line 83
+ # File 'lib/ctf_party/digest.rb', line 85
def sha2_384!
replace(sha2(bitlen: 384))
@@ -2640,12 +3384,12 @@
-88
-89
-90
+90
+91
+92
|
- # File 'lib/ctf_party/digest.rb', line 88
+ # File 'lib/ctf_party/digest.rb', line 90
def sha2_512
sha2(bitlen: 512)
@@ -2681,12 +3425,12 @@
-93
-94
-95
+95
+96
+97
|
- # File 'lib/ctf_party/digest.rb', line 93
+ # File 'lib/ctf_party/digest.rb', line 95
def sha2_512!
replace(sha2(bitlen: 512))
@@ -2873,21 +3617,230 @@
29
30
-31
-32
-33
-34
-35
+31
|
# File 'lib/ctf_party/base64.rb', line 29
def to_b64!(opts = {})
- opts[:mode] ||= :strict
- replace(to_b64) if opts[:mode] == :strict ||
- opts[:mode] == :rfc4648
- replace(to_b64(mode: :rfc2045)) if opts[:mode] == :rfc2045
- replace(to_b64(mode: :urlsafe)) if opts[:mode] == :urlsafe
+ replace(to_b64(opts))
+end
+ |
+
+