edvutils

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base58Encoded128BitToUUID added in v0.1.5

func Base58Encoded128BitToUUID(name string) (string, error)

Base58Encoded128BitToUUID decodes the given string and creates a uuid from the bytes array.

func CheckIfArrayIsURI added in v0.1.5

func CheckIfArrayIsURI(arr []string) error

CheckIfArrayIsURI checks if every string in the given string array is a valid URI.

func CheckIfBase58Encoded128BitValue added in v0.1.5

func CheckIfBase58Encoded128BitValue(id string) error

CheckIfBase58Encoded128BitValue can't tell if the value before being encoded was precisely 128 bits long. This is because the byte58.decode function returns an array of bytes, not just a string of bits. So the closest I can do is see if the decoded byte array is 16 bytes long, however this means that if the original value was 121 bits to 127 bits long it'll still be accepted.

func CheckIfURI added in v0.1.5

func CheckIfURI(str string) error

CheckIfURI checks if the given string is a valid URI.

func GenerateEDVCompatibleID

func GenerateEDVCompatibleID() (string, error)

GenerateEDVCompatibleID generates an EDV compatible ID using a cryptographically secure random number generator.

func ValidateJWE added in v0.1.5

func ValidateJWE(rawJWE []byte) error

ValidateJWE returns an error if the given raw JWE is empty or has invalid alg fields.

Types

This section is empty.

Jump to

Keyboard shortcuts

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