encryption_util

package
v0.0.0-...-7853e9f Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptionUtil

type EncryptionUtil struct{}

func NewEncryptionUtil

func NewEncryptionUtil() *EncryptionUtil

func (*EncryptionUtil) AesDecryptFromBase64

func (e *EncryptionUtil) AesDecryptFromBase64(encryptedText, selfEncryptionKeyBase64 string, iv []byte) (string, error)

func (*EncryptionUtil) AesEncryptFromBase64

func (e *EncryptionUtil) AesEncryptFromBase64(clearText, keyBase64 string, iv []byte) (string, error)

func (*EncryptionUtil) GenerateAESKeyBase64

func (e *EncryptionUtil) GenerateAESKeyBase64() (string, error)

func (*EncryptionUtil) GenerateRSAKeyPair

func (e *EncryptionUtil) GenerateRSAKeyPair() ([]byte, []byte, error)

func (*EncryptionUtil) PrivateKeyFromBase64

func (e *EncryptionUtil) PrivateKeyFromBase64(s string) (*rsa.PrivateKey, error)

func (*EncryptionUtil) PublicKeyFromBase64

func (e *EncryptionUtil) PublicKeyFromBase64(s string) (*rsa.PublicKey, error)

func (*EncryptionUtil) RsaDecryptFromBase64

func (e *EncryptionUtil) RsaDecryptFromBase64(cipherText string, privateKeyBytes []byte) (string, error)

func (*EncryptionUtil) RsaEncryptToBase64

func (e *EncryptionUtil) RsaEncryptToBase64(clearText string, publicKeyBytes []byte) (string, error)

func (*EncryptionUtil) SignSHA256RSA

func (e *EncryptionUtil) SignSHA256RSA(inputData string, privateKeyBytes []byte) (string, error)

Jump to

Keyboard shortcuts

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