Skip to content

雑に暗号化したいとき使う go ライブラリ

License

Notifications You must be signed in to change notification settings

thamaji/lazycrypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

lazycrypto

雑に暗号化したいとき使うやつ。

きっと openssl aes-256-ctr 互換の暗号化、復号化をする。

Example

package main

import (
	"fmt"
	"log"

	"github.com/thamaji/lazycrypto"
)

func main() {
	passphrase := []byte("hoge")
	secureText, err := lazycrypto.EncryptToString(passphrase, []byte("fuga"))
	if err != nil {
		log.Fatalln(err)
	}

	plainText, err := lazycrypto.DecryptString(passphrase, secureText)
	if err != nil {
		log.Fatalln(err)
	}

	fmt.Println(string(plainText))
}

About

雑に暗号化したいとき使う go ライブラリ

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages