utilities

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESGCMEncrypt

func AESGCMEncrypt(key, data, additionalData []byte) (iv, encrypted, tag []byte, err error)

func EncryptPassword

func EncryptPassword(password, pubKeyEncoded string, pubKeyVersion int, t string) (string, error)

func GenTOTP

func GenTOTP(secret string) (string, error)

GenTOTP will generate a one time pass based on the secret.

func RSADecodePublicKeyFromBase64

func RSADecodePublicKeyFromBase64(pubKeyBase64 string) (*rsa.PublicKey, error)

func RSAPublicKeyPKCS1Encrypt

func RSAPublicKeyPKCS1Encrypt(publicKey *rsa.PublicKey, data []byte) ([]byte, error)

Types

type ABool

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

func NewABool

func NewABool() *ABool

func (*ABool) Get

func (b *ABool) Get() bool

func (*ABool) Set

func (b *ABool) Set(val bool)

Jump to

Keyboard shortcuts

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