yaml_zlib_blowfish 2.0.230116 → 2.0.250921
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 +4 -2
- data/lib/yaml_zlib_blowfish.rb +6 -6
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89f1e4bf8e5417fdaba2c3c2f463523ccdeff02fa03afd053f60ca2f642c0efd
|
4
|
+
data.tar.gz: b527958974afda784d6ade0a972aaa3af130177e6115bce04d31424d5824b125
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fada397306c92ada977008c16113610d18c5328800773051fdc97d69945e8db44b57544c0ab494ca5f521cd4bc42d1093cc2ef99d7b543c982e160cd59be510f
|
7
|
+
data.tar.gz: b2b6e96c52fd2c17f0c9fe6faa4d2890ffbc227cf94c6b5465ace4ad3308e9ccca56fb40420777cf6f2e0d1ae3f6b5e450fe5ed9931d119df9a0089325a09866
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# YamlZlibBlowfish
|
2
2
|
|
3
|
-
* [VERSION 2.0.
|
3
|
+
* [VERSION 2.0.250921](https://github.com/carlosjhr64/yaml_zlib_blowfish/releases)
|
4
4
|
* [github](https://github.com/carlosjhr64/yaml_zlib_blowfish)
|
5
5
|
* [rubygems](https://rubygems.org/gems/yaml_zlib_blowfish)
|
6
6
|
|
@@ -9,6 +9,8 @@
|
|
9
9
|
Have you ever wanted to YAML dump, Zlib compress, and Blowfish encrypt your data structures?
|
10
10
|
YOU HAVE!? Well...
|
11
11
|
|
12
|
+
BUT BLOWFISH IS DEPRECATED! .·°՞(¯□¯)՞°·.
|
13
|
+
|
12
14
|
## SYNOPSIS:
|
13
15
|
```ruby
|
14
16
|
require 'yaml_zlib_blowfish'
|
@@ -27,7 +29,7 @@ conf1 == conf0 #=> true
|
|
27
29
|
|
28
30
|
(The MIT License)
|
29
31
|
|
30
|
-
Copyright (c)
|
32
|
+
Copyright (c) 2025 CarlosJHR64
|
31
33
|
|
32
34
|
Permission is hereby granted, free of charge, to any person obtaining
|
33
35
|
a copy of this software and associated documentation files (the
|
data/lib/yaml_zlib_blowfish.rb
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
# Standard Libraries
|
2
2
|
require 'yaml'
|
3
3
|
require 'zlib'
|
4
|
-
require 'openssl'
|
5
4
|
require 'digest/sha2'
|
5
|
+
require 'openssl'
|
6
|
+
OpenSSL::Provider.load('legacy')
|
6
7
|
|
7
8
|
class YamlZlibBlowfish
|
8
|
-
VERSION = '2.0.
|
9
|
+
VERSION = '2.0.250921'
|
9
10
|
|
10
11
|
# yzb = YamlZlibBlowfish.new(passphrase)
|
11
12
|
def initialize(passphrase)
|
12
13
|
# Blowfish takes a variable length key from 32 to 448 bits.
|
13
14
|
# Here we create a 256 bit key based on the pass-phrase:
|
14
|
-
@key
|
15
|
-
@cipher = OpenSSL::Cipher::BF.new(:CBC)
|
15
|
+
@key = Digest::SHA256.digest(passphrase)
|
16
16
|
end
|
17
17
|
|
18
18
|
# encrypted_string = yzb.cipher(:encrypt, plain_string)
|
19
19
|
# plain_string = yzb.cipher(:decrypt, encrypted_string)
|
20
20
|
def cipher(mode, data)
|
21
|
-
cipher =
|
21
|
+
cipher = OpenSSL::Cipher::BF.new(:CBC).send(mode)
|
22
22
|
cipher.key_len = @key.length
|
23
23
|
cipher.key = @key
|
24
|
-
cipher.update(data)
|
24
|
+
cipher.update(data) + cipher.final
|
25
25
|
end
|
26
26
|
|
27
27
|
# plain_structure = yzb.decrypt(encrypted_compressed_dump)
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaml_zlib_blowfish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.250921
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CarlosJHR64
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
Have you ever wanted to YAML dump, Zlib compress, and Blowfish encrypt your data structures?
|
15
15
|
YOU HAVE!? Well...
|
16
|
+
|
17
|
+
BUT BLOWFISH IS DEPRECATED! .·°՞(¯□¯)՞°·.
|
16
18
|
email: carlosjhr64@gmail.com
|
17
19
|
executables: []
|
18
20
|
extensions: []
|
@@ -24,7 +26,7 @@ homepage: https://github.com/carlosjhr64/yaml_zlib_blowfish
|
|
24
26
|
licenses:
|
25
27
|
- MIT
|
26
28
|
metadata: {}
|
27
|
-
post_install_message:
|
29
|
+
post_install_message:
|
28
30
|
rdoc_options: []
|
29
31
|
require_paths:
|
30
32
|
- lib
|
@@ -32,16 +34,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
32
34
|
requirements:
|
33
35
|
- - ">="
|
34
36
|
- !ruby/object:Gem::Version
|
35
|
-
version: '
|
37
|
+
version: '3.3'
|
36
38
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
39
|
requirements:
|
38
40
|
- - ">="
|
39
41
|
- !ruby/object:Gem::Version
|
40
42
|
version: '0'
|
41
|
-
requirements:
|
42
|
-
|
43
|
-
|
44
|
-
signing_key:
|
43
|
+
requirements: []
|
44
|
+
rubygems_version: 3.5.3
|
45
|
+
signing_key:
|
45
46
|
specification_version: 4
|
46
47
|
summary: Have you ever wanted to YAML dump, Zlib compress, and Blowfish encrypt your
|
47
48
|
data structures? YOU HAVE!? Well...
|