-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Secret generator #11
base: master
Are you sure you want to change the base?
Secret generator #11
Conversation
|
||
module RCreds | ||
module Generators | ||
class SecretGenerator < Rails::Generators::Base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QuantumSecret
class SecretGenerator < Rails::Generators::Base | ||
desc 'Generates quantum computed secret.' | ||
|
||
URI('https://qrng.anu.edu.au/API/jsonI.php').then do |uri| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if no internet connection?
bdc41eb
to
42f6a86
Compare
uri.query = URI.encode_www_form({ length: 1, type: 'hex16', size: 64 }) | ||
|
||
Net::HTTP.get_response(uri).then do |response| | ||
case response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to if else if only 2 options
No description provided.