crypto

package
v3.11.6-1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEqualConstantTime

func IsEqualConstantTime(s1, s2 string) bool

func Random256BitsString

func Random256BitsString() string

Random256BitsString is a convenience function for calling RandomBitsString(256). Callers that need a random string should use this function unless they have a very good reason to need a different amount of entropy.

func RandomBits

func RandomBits(bits int) []byte

RandomBits returns a random byte slice with at least the requested bits of entropy. Callers should avoid using a value less than 256 unless they have a very good reason.

func RandomBitsString

func RandomBitsString(bits int) string

RandomBitsString returns a random string with at least the requested bits of entropy. It uses RawURLEncoding to ensure we do not get / characters or trailing ='s.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL