crypto

package
v0.0.1-alpha9 Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package crypto contains utility functions for hashing and JWTs

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrJwtVerificationKeyNotSet = errors.New("no key set for JWT verification")
)

General error messages from JWT utilities.

View Source
var (
	ErrMalformedSha256 = errors.New("malformed sha256")
)

General error messages from the hash utilities.

Functions

func IsValidSha256

func IsValidSha256(value string) error

Check if a string value is a valid SHA256 hash.

func RunJwtChecks

func RunJwtChecks(tokenString string) (jwt.Token, error)

Check a JWT by parsing, validating, and verifying.

JWT parsing, validation, and verification are configurable.

func Sha256FromString

func Sha256FromString(value string) string

Get the SHA256 hash digest of a string value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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