barocert 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5c437f82ff3ad89c6bdbbf6b02a114f66f920980245ad0666834d4727bdc730
4
- data.tar.gz: 1216ae191dcbe95905c42ca31a62c5a9a24a0b5c893bfc28b274473870689651
3
+ metadata.gz: cf7b604b1bbf8dafc4d899209c4dea9db0195b163c788ce55476313d5c8a5c94
4
+ data.tar.gz: f795573b59f420f2fcf5e4804ef8ec31b7eff4418ff8d09ac9377c433256ce2f
5
5
  SHA512:
6
- metadata.gz: 317ed552d66e505a1d62cdfcc3d0c1749773f6a2e0ff7a63825a10a4b9a38262c9fbf31d6a931798ce4f502c0342fa1a3f9263704961a836b6981f2a194f5cc2
7
- data.tar.gz: a3f6381149f7f936eb739cb05ae33c4b62ee7fa3e883a8982b20c246c00b33ef18aee7e7e9e97ef1d56e0ae712dc47a409ed63f93f11ca9bb7dfb60f80e0601c
6
+ metadata.gz: 8f18d287ddd55c44cab41e20d4b0cfaedab5d267d1f1212250d428a5123fec55d5eea12dc7c7e03dd08c26da5eff343baf7a29002b506952f6d2c7423037f28d
7
+ data.tar.gz: 4ac4577cc71791d00abff1868cfb8e69b64ec9093ea9c9931ddccbbdbe1486aec0a56ebe660999c613cacdaa466ce2bf0b059259f8d5adba33ade541f3f7b164
@@ -20,6 +20,10 @@ class KakaocertService < BarocertService
20
20
  private :new
21
21
  end
22
22
 
23
+ def _sha256_base64url_file(target)
24
+ return self.sha256Base64urlFile(target)
25
+ end
26
+
23
27
  def _encrypt(plaintext)
24
28
  return aes256gcm(plaintext, @linkhub._secretKey)
25
29
  end
@@ -21,8 +21,11 @@ class NavercertService < BarocertService
21
21
  end
22
22
 
23
23
  def _sha256_base64url(target)
24
- hashed = Digest::SHA256.digest(target)
25
- return Base64.urlsafe_encode64(hashed, padding:false)
24
+ return self.sha256Base64urlFile(target)
25
+ end
26
+
27
+ def _sha256_base64url_file(target)
28
+ return self.sha256Base64urlFile(target)
26
29
  end
27
30
 
28
31
  def _encrypt(plaintext)
@@ -19,6 +19,10 @@ class PasscertService < BarocertService
19
19
  private :new
20
20
  end
21
21
 
22
+ def _sha256_base64url_file(target)
23
+ return self.sha256Base64urlFile(target)
24
+ end
25
+
22
26
  def _encrypt(plaintext)
23
27
  return aes256gcm(plaintext, @linkhub._secretKey)
24
28
  end
data/lib/barocert.rb CHANGED
@@ -4,6 +4,7 @@ require 'uri'
4
4
  require 'json'
5
5
  require 'date'
6
6
  require 'linkhub'
7
+ require 'digest'
7
8
 
8
9
  # Barocert API BaseService class
9
10
  class BarocertService
@@ -192,6 +193,11 @@ class BarocertService
192
193
  end
193
194
 
194
195
  #end of httppost
196
+
197
+ def sha256Base64urlFile(target)
198
+ hashed = Digest::SHA256.digest(target)
199
+ return Base64.urlsafe_encode64(hashed, padding:false)
200
+ end
195
201
  end
196
202
 
197
203
  # Barocert API Exception Handler class
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barocert
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linkhub Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-13 00:00:00.000000000 Z
11
+ date: 2024-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: linkhub