Documentation ¶
Index ¶
- type ISAAC
- func (r *ISAAC) Int() int
- func (r *ISAAC) Int31n(n int32) int32
- func (r *ISAAC) Int63() (number int64)
- func (r *ISAAC) Int63n(n int64) int64
- func (r *ISAAC) Intn(n int) int
- func (r *ISAAC) NextBytes(n int) []byte
- func (r *ISAAC) NextChar() byte
- func (r *ISAAC) Read(dst []byte) (n int, err error)
- func (r *ISAAC) String(len int) (ret string)
- func (r *ISAAC) Uint16() uint16
- func (r *ISAAC) Uint32() (number uint32)
- func (r *ISAAC) Uint64() (number uint64)
- func (r *ISAAC) Uint8() byte
- func (r *ISAAC) Uint8n(bound byte) (number byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ISAAC ¶
type ISAAC struct {
// contains filtered or unexported fields
}
ISAAC The state of the ISAAC CSPRNG
func (*ISAAC) Int31n ¶
Int31n Returns the next 4 bytes as a signed integer of 32 bits, with an upper bound of n from the ISAAC CSPRNG.
func (*ISAAC) Int63 ¶
Int63 Returns the next 8 bytes as a long integer from the ISAAC CSPRNG receiver instance.
func (*ISAAC) Int63n ¶
Int63n returns, as an int64, a non-negative pseudo-random number in [0,n). It panics if n <= 0.
func (*ISAAC) Intn ¶
Intn Returns the next 4 bytes as a signed integer of at least 32 bits, with an upper bound of n from the ISAAC CSPRNG.
func (*ISAAC) NextBytes ¶
NextBytes Returns the next `n` bytes from the ISAAC CSPRNG receiver instance, and since ISAAC generates 4-byte words,
if you request a length of bytes that is not divisible evenly by 4, it will stash the remaining bytes into a buffer to be used on your next call to this function.
func (*ISAAC) NextChar ¶
NextChar Returns the next ASCII character from the ISAAC CSPRNG receiver instance.
func (*ISAAC) String ¶
String Returns the next `len` ASCII characters from the ISAAC CSPRNG receiver instance as a Go string.
func (*ISAAC) Uint16 ¶
Uint16 Returns the next 2 bytes as a short integer from the ISAAC CSPRNG receiver instance.
func (*ISAAC) Uint32 ¶
Uint32 Returns the next 4 bytes as an integer from the ISAAC CSPRNG receiver instance.
func (*ISAAC) Uint64 ¶
Uint64 Returns the next 8 bytes as a long integer from the ISAAC CSPRNG receiver instance.