crypto

package
v0.0.0-...-0a88eae Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

From @enj openshift/origin https://github.com/openshift/origin/tree/9a8a2fb3f9485bf88ebea61e4b5d8bf04dd3c459/pkg/oauthserver/server/crypto

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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