crypto

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package crypto provides cryptographic utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(length int) ([]byte, error)

Bytes returns securely generated random bytes.

func BytesFromSample

func BytesFromSample(length int, samples ...string) ([]byte, error)

BytesFromSample returns securely generated random bytes from a string sample.

func Hash

func Hash(s string) (string, error)

Hash returns a sha512 hash of a string.

func String

func String(length int, samples ...string) (string, error)

String returns a securely generated random string from an optional sample.

func StringB64

func StringB64(length int, samples ...string) (string, error)

StringB64 returns a securely generated random string from an optional sample, encoded in base64.

Types

This section is empty.

Jump to

Keyboard shortcuts

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