blowfishj

package module
v0.0.0-...-c9c9b02 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

blowfishj-go

blowfishj-go ports CTS encryption and decryption from blowfishj.

Install

go get github.com/znbang/blowfishj-go 

Usage

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)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(key string, src string) (string, error)

func Encrypt

func Encrypt(key string, src string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL