Skip to content

Instantly share code, notes, and snippets.

View unmultimedio's full-sized avatar
👽
¯\_(ツ)_/¯

Julian Figueroa unmultimedio

👽
¯\_(ツ)_/¯
View GitHub Profile
@ygotthilf
ygotthilf / jwtRS256.sh
Last active May 4, 2024 09:43
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@jfcalvo
jfcalvo / digest.rb
Created October 3, 2011 09:28
Hash of files an strings with Ruby using MD5 and SHA256
require 'digest'
# Get SHA256 Hash of a file
puts Digest::SHA256.hexdigest File.read "data.dat"
# Get MD5 Hash of a file
puts Digest::MD5.hexdigest File.read "data.dat"
# Get MD5 Hash of a string
puts Digest::SHA256.hexdigest "Hello World"
# Get SHA256 Hash of a string using update