crypto

package
v3.11.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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