blowfishj-go ports CTS encryption and decryption from blowfishj.
go get github.com/znbang/blowfishj-go
package main
import (
"fmt"
"github.com/znbang/blowfishj-go"
)
const (
Password = "Pa$$w0rd"
PlainText = "Text to encrypt"
)
func main() {
encryptedText, err := blowfishj.Encrypt(Password, PlainText)
if err != nil {
panic(err)
}
fmt.Println("Encrypted text:", encryptedText)
decryptedText, err := blowfishj.Decrypt(Password, encryptedText)
if err != nil {
panic(err)
}
fmt.Println("Decrypted text:", decryptedText)
}