utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ECB_OAEP = "ECB_OAEP"
View Source
const GCM = "GCM_NOPADDING"

Variables

This section is empty.

Functions

func DecryptWithOAEP

func DecryptWithOAEP(base64Data string, privateKeyPath string) ([]byte, error)

func DecryptWithRSA

func DecryptWithRSA(base64Data string, privateKeyPath string) ([]byte, error)

func EncryContentWithAES

func EncryContentWithAES(data string, aesKey []byte, aesIv []byte) (string, error)

func EncryContentWithAESGCM

func EncryContentWithAESGCM(data string, aesKey []byte, aesIv []byte) (string, error)

func EncryptWithOAEP

func EncryptWithOAEP(data []byte, publicKeyPath string) (string, error)

func EncryptWithRSA

func EncryptWithRSA(data []byte, publicKeyPath string) (string, error)

func NewCBCDecrypter

func NewCBCDecrypter(key []byte, iv []byte, ciphertext []byte) ([]byte, error)

func NewGCMDecrypter

func NewGCMDecrypter(key []byte, iv []byte, ciphertext []byte) ([]byte, error)

func SignParamsWithRSA

func SignParamsWithRSA(data string, privateKeyPath string) (string, error)

func VerifySignWithRSA

func VerifySignWithRSA(data string, base64Sign string, rasPublicKeyPath string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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