securerandom 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/test.yml +1 -1
- data/lib/securerandom.rb +5 -4
- data/securerandom.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 396cd8fff3b7710c09c49c19017c3b32b81810ab7aa4d4d468e88e0231294da4
|
4
|
+
data.tar.gz: c0a2fa9b2e657eff48a221877b49a3c7d20d18ca955cfcc90594b28a4adcef74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f562481a1134ea11d151e3167c700b9995767aa7f643c8d95b112af872c9a2884e74194550329b618a05081b05bc96e21d1e7c7e117940c4a8edbb5a94897d7
|
7
|
+
data.tar.gz: 81aea2e28ad6406656700f8b2df92f9a87d1b6eca6ab5b2edd9753dcf444968bdbedda317a1785ad781ddf4ddbdefac117cc91871466f1a8c7af4f36d7ed1f15
|
data/.github/workflows/test.yml
CHANGED
data/lib/securerandom.rb
CHANGED
@@ -72,8 +72,11 @@ module SecureRandom
|
|
72
72
|
ret
|
73
73
|
end
|
74
74
|
|
75
|
-
|
76
|
-
|
75
|
+
begin
|
76
|
+
# Check if Random.urandom is available
|
77
|
+
Random.urandom(1)
|
78
|
+
alias gen_random gen_random_urandom
|
79
|
+
rescue RuntimeError
|
77
80
|
begin
|
78
81
|
require 'openssl'
|
79
82
|
rescue NoMethodError
|
@@ -81,8 +84,6 @@ module SecureRandom
|
|
81
84
|
else
|
82
85
|
alias gen_random gen_random_openssl
|
83
86
|
end
|
84
|
-
else
|
85
|
-
alias gen_random gen_random_urandom
|
86
87
|
end
|
87
88
|
|
88
89
|
public :gen_random
|
data/securerandom.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: securerandom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanaka Akira
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Interface for secure random number generator.
|
14
14
|
email:
|
@@ -17,6 +17,7 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
+
- ".github/dependabot.yml"
|
20
21
|
- ".github/workflows/test.yml"
|
21
22
|
- ".gitignore"
|
22
23
|
- Gemfile
|