rcrypto 1.0 → 1.0.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -0
  3. metadata +6 -7
  4. data/lib/RCrypto/encode.rb +0 -32
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3af4e1f11c1db798442da56a2f451abd4f77ea7b6ab51d3a8714a055fc77552e
4
- data.tar.gz: f39a0a959480d573e635a31c9e9ae70f69dbbd97c53569c2361e44e3dea164da
3
+ metadata.gz: 758d77d1bc29734289b56e6970c14066d4609b4f8212e4e3575f07c0f3e16734
4
+ data.tar.gz: dca9fd8c4de1999a6f4b02ca969f338a84780f270b9b125c953990500a299623
5
5
  SHA512:
6
- metadata.gz: c567ca02115e156bd8cf620089ea97e6cc3ca0994c160d85a87eee68bda90111c7df839de7528757bee2f855e000a40aba077edbef3dc23234f4dfc345bfa63c
7
- data.tar.gz: 60499a2a310c8d9292cbbbc9fc7e95713f7b731b297efeb00353cd82be024f0de2373df87c4b4dbe73e384033117532ca362117add2ebbf7b58a05b90f9761a3
6
+ metadata.gz: 348d2c6373ab7a2e98edaf89a37e80aa64eb9dadf4f43b96ba051903c7cfcb690ba490af3da8ba0e53d7dedb634349c05d5049c9e4dc85b9510635b0acb32338
7
+ data.tar.gz: 26b8f92173f8949d799e8eff56cc69bb179fc14a5ce5f55010a21687cc5dc5712bcc680ab525dd89c1922a83efd243a3b0398dda1f431e6bb0e396c3d2d4b29f
data/README.md CHANGED
@@ -191,3 +191,7 @@ If you encounter any issues or have suggestions for improvements, please feel fr
191
191
  - Special thanks to the open-source community for their continuous support.
192
192
  - Inspired by classic encryption techniques and the need for secure communication in Ruby applications.
193
193
 
194
+ # rcrypto
195
+ # rcrypto
196
+ # rcrypto
197
+ # rcrypto
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcrypto
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
  - MAVEN
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-14 00:00:00.000000000 Z
11
+ date: 2024-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: openssl
@@ -119,7 +119,6 @@ files:
119
119
  - README.md
120
120
  - lib/RCrypto.rb
121
121
  - lib/RCrypto/decode.rb
122
- - lib/RCrypto/encode.rb
123
122
  - lib/RCrypto/version.rb
124
123
  - spec/rcrypto_spec.rb
125
124
  - spec/spec_helper.rb
@@ -128,7 +127,7 @@ licenses:
128
127
  - MIT
129
128
  metadata:
130
129
  allowed_push_host: https://rubygems.org
131
- post_install_message:
130
+ post_install_message:
132
131
  rdoc_options: []
133
132
  require_paths:
134
133
  - lib
@@ -143,8 +142,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
142
  - !ruby/object:Gem::Version
144
143
  version: '0'
145
144
  requirements: []
146
- rubygems_version: 3.5.16
147
- signing_key:
145
+ rubygems_version: 3.0.3.1
146
+ signing_key:
148
147
  specification_version: 4
149
148
  summary: A custom encryption library for Ruby.
150
149
  test_files: []
@@ -1,32 +0,0 @@
1
- # lib/RCrypto/encode.rb
2
-
3
- module RCrypto
4
- module Encode
5
- def self.xor_encrypt(text, key)
6
- text.bytes.map.with_index do |byte, i|
7
- (byte ^ key.bytes[i % key.length]).chr
8
- end.join
9
- end
10
-
11
- def self.base64_custom_encode(text)
12
- Base64.strict_encode64(text)
13
- end
14
-
15
- def self.caesar_cipher_encrypt(text, shift)
16
- text.chars.map do |char|
17
- if char.match(/[a-zA-Z]/)
18
- base = char =~ /[a-z]/ ? 'a'.ord : 'A'.ord
19
- ((char.ord - base + shift) % 26 + base).chr
20
- else
21
- char
22
- end
23
- end.join
24
- end
25
-
26
- def self.add_fake_token(text)
27
- fake_token = "$" + SecureRandom.alphanumeric(10)
28
- insertion_point = SecureRandom.random_number(text.length)
29
- text.insert(insertion_point, fake_token)
30
- end
31
- end
32
- end