securerandom 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/securerandom.rb +7 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d1e553e66963e86b8c31aeaca8030543f034770d4c91652e905e7d24101a267
|
4
|
+
data.tar.gz: b9088d38e62d77718b8cdf44f12e5027763bfc49d08e98e2190cac40217a53e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd175de6c33318073d7eeae18ed42bbd797f425ebcfcddcfd4d91cc9256fcd9b4ee96d9ef409e2817a49cdfc5f3a85496018a5642ce62124d09212c8b48348c8
|
7
|
+
data.tar.gz: 51914a9cfa12a128634135d650b9213a5aab22005542ad1fd79fa74b1456a3388def2ba1d13255262437a22e971fd888eeaaac63121111fa5a245b2429d99889
|
data/lib/securerandom.rb
CHANGED
@@ -41,7 +41,7 @@ require 'random/formatter'
|
|
41
41
|
module SecureRandom
|
42
42
|
|
43
43
|
# The version
|
44
|
-
VERSION = "0.4.
|
44
|
+
VERSION = "0.4.1"
|
45
45
|
|
46
46
|
class << self
|
47
47
|
# Returns a random binary string containing +size+ bytes.
|
@@ -51,6 +51,12 @@ module SecureRandom
|
|
51
51
|
return gen_random(n)
|
52
52
|
end
|
53
53
|
|
54
|
+
# Compatibility methods for Ruby 3.2, we can remove this after dropping to support Ruby 3.2
|
55
|
+
def alphanumeric(n = nil, chars: ALPHANUMERIC)
|
56
|
+
n = 16 if n.nil?
|
57
|
+
choose(chars, n)
|
58
|
+
end if RUBY_VERSION < '3.3'
|
59
|
+
|
54
60
|
private
|
55
61
|
|
56
62
|
# :stopdoc:
|
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.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanaka Akira
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Interface for secure random number generator.
|
14
14
|
email:
|
@@ -28,7 +28,7 @@ licenses:
|
|
28
28
|
metadata:
|
29
29
|
homepage_uri: https://github.com/ruby/securerandom
|
30
30
|
source_code_uri: https://github.com/ruby/securerandom
|
31
|
-
post_install_message:
|
31
|
+
post_install_message:
|
32
32
|
rdoc_options: []
|
33
33
|
require_paths:
|
34
34
|
- lib
|
@@ -44,7 +44,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
44
44
|
version: '0'
|
45
45
|
requirements: []
|
46
46
|
rubygems_version: 3.5.11
|
47
|
-
signing_key:
|
47
|
+
signing_key:
|
48
48
|
specification_version: 4
|
49
49
|
summary: Interface for secure random number generator.
|
50
50
|
test_files: []
|