util

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package util contains utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreUsagesValid

func AreUsagesValid(allowed []webcrypto.KeyUsage, actual []webcrypto.KeyUsage) error

AreUsagesValid will check if the usages provided exist in the usages allowed.

func Encoding

func Encoding() *base64.Encoding

Encoding returns the common base64 encoding used.

func GetHash

func GetHash(hash string) (hash.Hash, error)

GetHash will return a new hasher or error if the hash is unknown. Valid hash types are SHA-1, SHA-256, SHA-384 and SHA-512.

func NotNilOrPanic

func NotNilOrPanic(name string, v any)

func UsageIntersection

func UsageIntersection(v1 []webcrypto.KeyUsage, v2 []webcrypto.KeyUsage) []webcrypto.KeyUsage

UsageIntersection returns the intersection of v1 and v2 values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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