Created
August 6, 2018 06:01
-
-
Save zouchao/532077cc3710fd314f6a41659bab3a3d 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
# Generate SHA256 hash | |
require 'digest' | |
Digest::SHA256.hexdigest "your_string" | |
# Generate MD5 | |
require 'digest/md5' | |
Digest::MD5.hexdigest "your_string" | |
# Generate UUID | |
SecureRandom.uuid.split('-').join |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment