This is a Go package that implements the FNV-XOR-Mask-Shuffle symmetric encryption algorithm. This algorithm is a combination of several cryptographic techniques that make it difficult for an attacker to decrypt the data.
To use this package, you can install it using go get command:
go get -u github.com/NIR3X/fxms
Here is an example of how to use this package:
package main
import (
"fmt"
"github.com/NIR3X/fxms"
)
func main() {
// Generate a random key
key := fxms.GenKey()
// Data to encrypt
data := []uint8("Hello, World!")
// Encrypt the data
encrypted, err := fxms.Encrypt(key, data, fxms.OptimizeDecryption)
if err != nil {
panic(err)
}
// Decrypt the data
decrypted, ok, err := fxms.Decrypt(key, encrypted, fxms.OptimizeDecryption)
if err != nil {
panic(err)
}
if !ok {
panic("Decryption failed")
}
// Print the decrypted data
fmt.Printf("%s\n", decrypted)
}
This program is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.