Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BigIntToRunes ¶
convert a big integer to an array of runes in the specified radix, padding the output to the left with 0's
Types ¶
type Alphabet ¶
type Alphabet struct {
// contains filtered or unexported fields
}
func NewAlphabet ¶
type FF1 ¶
type FF1 struct {
// contains filtered or unexported fields
}
Context structure for FF1 FPE algorithm
func NewFF1 ¶
Allocate a new FF1 context structure
@key specifies the key for the algorthim, the length of which will determine the underlying aes encryption to use.
@twk specifies the default tweak to be used if one is not specified to the Encrypt or Decrypt functions. nil is allowed
@mintwk and @maxtwk specify the minimum and maximum tweak sizes allowed by the algorithm. both may be set to 0 to indicate that there is no limit on the tweak size
@radix specifies the radix of the input/output data
the function also accepts an optional argument: @alpha is a string containing the alphabet for numerical conversions
func (*FF1) Decrypt ¶
Decrypt a string @X with the tweak @T
@T may be nil, in which case the default tweak will be used
type FF3_1 ¶
type FF3_1 struct {
// contains filtered or unexported fields
}
Context structure for the FF3-1 FPE algorithm
func NewFF3_1 ¶
Allocate a new FF3-1 context structure
@key specifies the key for the algorthim, the length of which will determine the underlying aes encryption to use.
@twk specifies the default tweak to be used. the tweak must be exactly 7 bytes long
@radix specifies the radix of the input/output data
the function also accepts an optional argument: @alpha is a string containing the alphabet for numerical conversions
func (*FF3_1) Decrypt ¶
Decrypt a string @X with the tweak @T
@T may be nil, in which case the default tweak will be used