Documentation
¶
Index ¶
- Variables
- func ConstantTimeCompareBytes(a []byte, b []byte) bool
- func DecodeED25519PrivateKey(encoded []byte) (ed25519.PrivateKey, error)
- func DecodePublicKey(encoded []byte) (crypto.PublicKey, error)
- func DefaultFiberApp() *fiber.App
- func EncodeED25519PrivateKey(privateKey ed25519.PrivateKey) []byte
- func EncodePublicKey(publicKey crypto.PublicKey) []byte
- func GenericZero[T any]() T
- func RandomBase32Bytes(length int) []byte
- func RandomBase32String(n int) string
- func RandomBytes(n int) []byte
- func RandomString(n int) string
- func RemovePortFromHostPort(hostport string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidPKCS8PrivateKey = errors.New("invalid PKCS8 private key") ErrInvalidPKIXPublicKey = errors.New("invalid PKIX public key") )
Functions ¶
func ConstantTimeCompareBytes ¶ added in v1.0.0
ConstantTimeCompareBytes compares two byte slices in constant time
func DecodeED25519PrivateKey ¶ added in v1.0.0
func DecodeED25519PrivateKey(encoded []byte) (ed25519.PrivateKey, error)
func DecodePublicKey ¶ added in v1.0.0
func DefaultFiberApp ¶
DefaultFiberApp returns a new fiber app with sensible defaults
func EncodeED25519PrivateKey ¶ added in v1.0.0
func EncodeED25519PrivateKey(privateKey ed25519.PrivateKey) []byte
func EncodePublicKey ¶ added in v1.0.0
func GenericZero ¶ added in v1.0.0
func GenericZero[T any]() T
func RandomBase32Bytes ¶ added in v1.0.0
RandomBase32Bytes generates a random byte slice length n of base32 characters
func RandomBase32String ¶ added in v1.0.0
RandomBase32String generates a random base32 string of length n
func RandomBytes ¶
RandomBytes generates a random byte slice of length n
func RandomString ¶
RandomString generates a random string of length n
func RemovePortFromHostPort ¶ added in v1.0.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.