Crypto
Diversos modos de criptografia para GoLang
Installation
To install try package, you need to install Go and set your Go workspace first.
- Download and install it:
$ go get -u github.com/c019/crypto
- Import it in your code:
import "github.com/c019/crypto"
API examples:
package main
import (
"github.com/c019/crypto"
)
func main() {
sha256 := crypto.Sha256{
Texto: "c019.com.br",
}
fmt.Println(sha256.Encrypt())
}
OBS: Caso queria gerar os arquivos SSL para utilização da criptografia RSA
openssl req -new -x509 -sha256 -newkey rsa:2048 -nodes -keyout modelo.key.pem -out modelo.cert.pem -subj "/C=BR/ST=PR/O=Modelo"