Documentation
¶
Overview ¶
Package golea implements Lightweight Encryption Algorithm
Index ¶
Examples ¶
Constants ¶
View Source
const Blocksize int = 16
Blocksize LEA uses 16bit blocksize
Variables ¶
This section is empty.
Functions ¶
func NewCipher ¶ added in v1.0.1
NewCipher returns a new cipher.Block
Example ¶
lea, err := NewCipher([]byte("MySuperSecretKey")) if err != nil { return } plaintext := []byte("Hello good world") encrypted := make([]byte, 16) decrypted := make([]byte, 16) lea.Encrypt(encrypted, plaintext) fmt.Printf("%x\n", encrypted) lea.Decrypt(decrypted, encrypted) fmt.Println(string(decrypted))
Output: fd9eef064e2abe62a980a870779fab3d Hello good world
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.