crypto

package module
v0.0.0-...-7a44c7d Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2019 License: MIT Imports: 2 Imported by: ? 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.

README

crypto

Crypto Rand Wrapper for DI

Documentation

Overview

Package crypto wraps the crypto/rand package making it easier to use with type oriented dependency injection frameworks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(b []byte) (n int, err error)

Read is a helper function that calls Reader.Read using io.ReadFull. On return, n == len(b) if and only if err == nil.

Copied from crypto/rand.Read.

Types

type Reader

type Reader io.Reader

Reader is a unique type for crypto random number generators that allows DI frameworks like wire to distinguish pseudo-random number generators from secure random number generators.

func GlobalReader

func GlobalReader() Reader

GlobalReader returns the shared global reader exposed by the crypto/rand package

Jump to

Keyboard shortcuts

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