pwtgo

package module
v0.0.0-...-0bcc0e3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: MIT Imports: 12 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

pwt-go

Implementation of Protocol-Buffers-Web-Tokens written in Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alg

type Alg string

Alg : Signing Algorithm

const BLAKE2B256 Alg = "BLAKE2B-256"

BLAKE2B256 : BLAKE2B-256

const BLAKE2B384 Alg = "BLAKE2B-384"

BLAKE2B384 : BLAKE2B-384

const BLAKE2B512 Alg = "BLAKE2B-512"

BLAKE2B512 : BLAKE2B-512

const BLAKE3 Alg = "BLAKE3"

BLAKE3 : BLAKE3

const HBLAKE3 Alg = "HBLAKE3"

HBLAKE3 : HMAC-BLAKE3

const HS256 Alg = "HMAC-SHA-256"

HS256 : HMAC-SHA-256

const HS384 Alg = "HMAC-SHA-384"

HS384 : HMAC-SHA-384

const HS512 Alg = "HMAC-SHA-512"

HS512 : HMAC-SHA-512

type Signer

type Signer struct {
	// contains filtered or unexported fields
}

Signer : encode, decode, sign, verify

func NewHash

func NewHash(alg Alg, key []byte) (*Signer, error)

NewHash : Cryptographic hash-based signer

func (*Signer) Encode

func (s *Signer) Encode(payload protoreflect.ProtoMessage, expire time.Duration) (string, error)

Encode : Encode Payload to PWT

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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