base45_lite 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/base45_lite.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 103d388e3c84ba667a88e5c39dcc6e0fdd1822dc5a0204227c0b48b6001d3d98
|
4
|
+
data.tar.gz: c7e0015b559bef067ca7283af4560a4684898b21fd502cc8ea3f0088e70d45a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55c2d4eb7c249172a7727f0d3fc5ea9e50b6e74a985aded41a644e67c87973441918c8b7c4e8bcd42774ae74cf78e48f18db34533b450a88fcf49a07b2ec49ad
|
7
|
+
data.tar.gz: 98fdecf9b3a06e9bda66b2f24bdfa4348378e30cd2b7e00ac9782b032589e5e1ebe5daadab8a7a3f0fa929b608416930206ceae6a64e4e01f2db247385e5507b
|
data/lib/base45_lite.rb
CHANGED
@@ -50,12 +50,12 @@ module Base45Lite
|
|
50
50
|
_, d = i.divmod(45)
|
51
51
|
sequence.push(c, d)
|
52
52
|
end
|
53
|
-
sequence.map!{ MAPPING[
|
53
|
+
sequence.map!{ |n| MAPPING[n] }.join
|
54
54
|
end
|
55
55
|
|
56
56
|
def self.decode(input)
|
57
57
|
input
|
58
|
-
.chars.map! { REVERSE_MAPPING[
|
58
|
+
.chars.map! { |c| REVERSE_MAPPING[c] || raise(InvalidCharacterError) }
|
59
59
|
.each_slice(3).map do |slice|
|
60
60
|
c, d, e = slice
|
61
61
|
raise ForbiddenLengthError if d.nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: base45_lite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Weihang Jian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -58,14 +58,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.
|
61
|
+
version: 2.3.0
|
62
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
64
|
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0'
|
67
67
|
requirements: []
|
68
|
-
rubygems_version: 3.
|
68
|
+
rubygems_version: 3.4.5
|
69
69
|
signing_key:
|
70
70
|
specification_version: 4
|
71
71
|
summary: Base45 encoder/decoder
|