You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 2, 2022. It is now read-only.
package main
import (
"fmt""github.com/capitalone/fpe/ff1"
)
// Note: panic(err) is just used for example purposes.funcmain() {
key:= []byte{0x4, 0x8, 0x15, 0x16, 0x23, 0x42, 0x4, 0x8, 0x15, 0x16, 0x23, 0x42, 0x4, 0x8, 0x15, 0x16, 0x23, 0x42, 0x4, 0x8, 0x15, 0x16, 0x23, 0x42}
tweak:= []byte{0x42}
// Create a new FF1 cipher "object"// 10 is the radix/base, and 8 is the tweak length.ciph, err:=ff1.NewCipher(10, 8, key, tweak)
iferr!=nil {
panic(err)
}
original:="750000000"// Call the encryption function on an example test vectorciphertext, err:=ciph.Encrypt(original)
iferr!=nil {
fmt.Println(err)
}
fmt.Println(ciphertext)
}