A Golang implementation of the AES-FFX Format-Preserving Encryption Scheme
$ go get github.com/roasbeef/perm-crypt
key, _ := hex.DecodeString("2b7e151628aed2a6abf7158809cf4f3c")
tweak := []byte("9876543210")
plainString := "0123456789"
ffx, _ := aesffx.NewCipher(10, key, tweak)
cipher, _ := ffx.Encrypt(plainString)
plain, _ := ffx.Decrypt(cipher)