jwk-tool 0.0.4 → 0.0.5
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.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/jwk-tool.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9773af2ef71f2d7f7dcdaad762f6947f1fe65f70
|
4
|
+
data.tar.gz: 7092b06c11e8968898f8f7630a32f401d0ddc589
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 899e10d4b0594d4e6290bdca73e27c36a6f4c9537282b250e1a9f762f2da0045230bd9de48d0876ef2c881c92cc565073d7375224df480ce053767a828cbad8f
|
7
|
+
data.tar.gz: b54ae1e96dfb788f70252eca50a63ca0e4e7aff96d61a7e4e2d9b2e5b85e8a0192fab70f159c13996e7142777c6d7188a3cb0bf71e3b33ceb1d240f8c96693b4
|
data/README.md
CHANGED
@@ -20,7 +20,7 @@ An encryption example at sender node using public key.
|
|
20
20
|
```ruby
|
21
21
|
require 'json/jwk'
|
22
22
|
# read public key from file
|
23
|
-
jwk_pub = JSON::JWK.new(JSON.parse(open('
|
23
|
+
jwk_pub = JSON::JWK.new(JSON.parse(open('key.pub').read))
|
24
24
|
# encrypt plain text "hogehogefoofoo"
|
25
25
|
jwe = JSON::JWE.new("hogehogefoofoo")
|
26
26
|
# choose block cipher algorithm
|
@@ -38,7 +38,7 @@ A decryption example at receiver node using private key.
|
|
38
38
|
```ruby
|
39
39
|
require 'json/jwk'
|
40
40
|
# read private key from file
|
41
|
-
jwk = JSON::JWK.new(JSON.parse(open('
|
41
|
+
jwk = JSON::JWK.new(JSON.parse(open('key').read))
|
42
42
|
# decrypt JSON format cipher data
|
43
43
|
jwe_dec = JSON::JWE.decode_json_serialized(JSON.parse(json), jwk.to_key)
|
44
44
|
# obtain the original plain text
|
data/jwk-tool.gemspec
CHANGED