base32.rb 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/base32.rb +7 -0
- data/lib/base32/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 201d61d364190048ee76ca4dadf25451ad8238aebb852321cdb74c1cc270b0cb
|
4
|
+
data.tar.gz: 6cd2a411866e8df802264308e0e3d24d2f0406e2c3bb3801d27c5aa39abe7844
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 693a869ac95855125c12f4533e5ecc7dbe597b915ffe74498aca42955b63742afeafcf0940b09ede33d9d79268057cadbbb1e44c3c15c0ff77946aeb708e76a1
|
7
|
+
data.tar.gz: '09393940cbc720f1ce81b78f89c69934de4b7ee64626022e5d67a088b4390d3e925d4402aceee9e1020610d5c4c5b3d50a4693eccc6098377e1eac2cd4e56528'
|
data/lib/base32.rb
CHANGED
@@ -10,4 +10,11 @@ require 'base32/random'
|
|
10
10
|
|
11
11
|
# Module for encoding and decoding in Base32 per RFC 3548
|
12
12
|
module Base32
|
13
|
+
def self.decode(str, alphabet = Base32::Alphabet::CHARS)
|
14
|
+
Decoder.new(str, alphabet).call
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.encode(str, alphabet = Base32::Alphabet::CHARS)
|
18
|
+
Encoder.new(str, alphabet).call
|
19
|
+
end
|
13
20
|
end
|
data/lib/base32/version.rb
CHANGED