Skip to content

Instantly share code, notes, and snippets.

View rafaelsq's full-sized avatar
🇧🇷
¯\(°_o)/¯

Rafael Quintela rafaelsq

🇧🇷
¯\(°_o)/¯
View GitHub Profile
@rafaelsq
rafaelsq / webcryptoapi.html
Created April 23, 2020 12:25 — forked from deiu/webcryptoapi.html
Web Crypto API example: RSA keygen & export & import & sign & verify & encrypt & decrypt
<!-- MIT License -->
<html>
<head>
<script>
function generateKey(alg, scope) {
return new Promise(function(resolve) {
var genkey = crypto.subtle.generateKey(alg, true, scope)
genkey.then(function (pair) {
resolve(pair)
})
@rafaelsq
rafaelsq / bcrypt.go
Last active July 29, 2021 21:13 — forked from manishtpatel/main.go
encrypt data!
package main
import (
"fmt"
"golang.org/x/crypto/bcrypt"
)
func main() {
pass := []byte("pa$$w0rd")