Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CFB cryptCFB
Encryption: AES-CFB
var Hash cryptHash
Hashing: HMAC - SHA256
Functions ¶
func GenUUID ¶
GenUUID generates a Unique Identifier using a custom build method
Notice: This feature is currently in beta
@size: (minimum: 8) the bit size for the last part of the uuid (note: other parts may vary)
@timezone: optionally add a timezone string to the uuid (note: you could also pass random info into here for a more complex algorithm)
This method uses the following data:
- A hash of the current year and day of year
- A hash of the current timezone
- A hash of the current unix time (in seconds)
- A hash of the current unix time in nanoseconds and a random number
The returned value is url encoded and will look something like this: xxxx-xxxx-xxxx-xxxxxxxx
func RandBytes ¶
RandBytes generates random bytes using crypto/rand
@exclude[0] allows you can to pass an optional []byte to ensure that set of chars will not be included in the output string
@exclude[1] provides a replacement string to put in place of the unwanted chars
@exclude[2:] is currently ignored
Types ¶
This section is empty.