-
-
Save anonymous/d9cc734b9ed527b60347a27f7465998b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
winning_number = SecureRandom.random_number(0..36).to_s | |
digest = OpenSSL::Digest.new('sha256') | |
secret_key = SecureRandom.urlsafe_base64(nil, false) | |
hash = OpenSSL::HMAC.hexdigest(digest, secret_key, winning_number) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment