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: 0

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