Documentation ¶
Overview ¶
Package crypto provides basic cryptographic routines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualString ¶
Equal returns true if x == y using constant time comparison.
func Key ¶
Key calls a standardized scrypt.Key.
N = 1 << 15 (32768) r = 8 p = 1 keylen = 32
It panics if scrypt.Key panics, but that will only happen if the constants are invalid. (Which won't happen.)
Types ¶
type Clearer ¶
type Clearer struct {
// contains filtered or unexported fields
}
Clearer allows deferred clearing of multiple slices while still allowing the slices to be used inside goroutines. Add should be called to add another reader to the Clearer. Once the slice is finished being used, Done should be called.
func NewClearer ¶
NewClearer creates a new Clearer initialized with the provided byte slices.
Directories ¶
Path | Synopsis |
---|---|
Package rng provides routines to create random integers.
|
Package rng provides routines to create random integers. |
Timebox is a thin wrapper around nacl/secretbox for time-based secrets.
|
Timebox is a thin wrapper around nacl/secretbox for time-based secrets. |
Tokens is a group of useful functions for creating cryptographically-secure tokens.
|
Tokens is a group of useful functions for creating cryptographically-secure tokens. |
Package xsrf provides simple routines for creating and retrieving XSRF tokens with the Angular framework.
|
Package xsrf provides simple routines for creating and retrieving XSRF tokens with the Angular framework. |
Click to show internal directories.
Click to hide internal directories.