Documentation ¶
Index ¶
- Variables
- func DecodeInt64(s string) (int64, error)
- func DecodeUint64(s string) (uint64, error)
- func EncodeInt64(n int64) string
- func EncodeUint64(n uint64) string
- func Int64Hash(n int64) int64
- func Int64SetPrime(prime, xor int64) error
- func Int64ToString(n int64) string
- func Int64Unhash(n int64) int64
- func SetLowerCase()
- func SetUpperCase()
- func StringToInt64(s string) (int64, error)
- func StringToUint64(s string) (uint64, error)
- func Uint64Hash(n uint64) uint64
- func Uint64SetPrime(prime, xor uint64) error
- func Uint64ToString(n uint64) string
- func Uint64Unhash(n uint64) uint64
- type Int64
- type Uint64
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrOutOfRange = errors.New("Prime is greater than max value for the type") ErrNotAPrime = errors.New("It is not a prime number") ErrCannotModInvert = errors.New("Cannot mod invert") )
Knuth multiplicative hash Adapted from github.com/c2h5oh/hide
View Source
var ( ErrInvalidString = errors.New("Invalid character in string") ErrTooBig = errors.New("String too big") )
View Source
var ErrScanInt64 = errors.New("Incompatible type")
View Source
var ErrScanUint64 = errors.New("Incompatible type")
Functions ¶
func DecodeInt64 ¶
func DecodeUint64 ¶
func EncodeInt64 ¶
func EncodeUint64 ¶
func Int64SetPrime ¶
func Int64ToString ¶
func Int64Unhash ¶
func SetLowerCase ¶
func SetLowerCase()
func SetUpperCase ¶
func SetUpperCase()
func StringToInt64 ¶
func StringToUint64 ¶
func Uint64Hash ¶
func Uint64SetPrime ¶
func Uint64ToString ¶
func Uint64Unhash ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.