utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HashTypeSHA256 is the hash type for SHA-256
	HashTypeSHA256 = "SHA256"

	// HashTypeSHA384 is the hash type for SHA-384
	HashTypeSHA384 = "SHA384"

	// HashTypeSHA512 is the hash type for SHA-512
	HashTypeSHA512 = "SHA512"

	// RandomBytesLength is length of random bytes
	RandomBytesLength = 64
)

Variables

This section is empty.

Functions

func GenerateHash

func GenerateHash(hashType string) (string, error)

GenerateHash generates a random hash based on the given hash type

func GenerateVerificationCode

func GenerateVerificationCode(hash string) (string, error)

GenerateVerificationCode generates a verification code based on the given hash

Types

type Identity

type Identity struct {
	Country string
	Type    string
	ID      string
}

type Person

type Person struct {
	IdentityNumber string
	PersonalCode   string
	FirstName      string
	LastName       string
}

func Extract

func Extract(encodedCert string) (*Person, error)

Jump to

Keyboard shortcuts

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