crypto

package
v0.0.0-...-a2b917b Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHash

func CreateHash(ctx context.Context, algorithm string) (*isolates.Value, error)

func CreateHmac

func CreateHmac(ctx context.Context, algorithm string, key any) (*isolates.Value, error)

func RandomBytes

func RandomBytes(ct context.Context) (*isolates.Value, error)

Types

type Hash

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

func NewHash

func NewHash(algorithm string) (*Hash, error)

func NewHmac

func NewHmac(algorithm string, key []byte) (*Hash, error)

func (*Hash) Algorithm

func (h *Hash) Algorithm() string

func (*Hash) Sum

func (h *Hash) Sum(encoding *buffer.BufferEncoding) (any, error)

func (*Hash) Update

func (h *Hash) Update(ctx context.Context, b any) (*Hash, error)

func (*Hash) V8FuncDigest

func (h *Hash) V8FuncDigest(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Hash) V8FuncUpdate

func (h *Hash) V8FuncUpdate(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Hash) V8GetAlgorithm

func (h *Hash) V8GetAlgorithm(in isolates.GetterArgs) (*isolates.Value, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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