Documentation ¶
Index ¶
- type EncryptionUtil
- func (e *EncryptionUtil) AesDecryptFromBase64(encryptedText, selfEncryptionKeyBase64 string, iv []byte) (string, error)
- func (e *EncryptionUtil) AesEncryptFromBase64(clearText, keyBase64 string, iv []byte) (string, error)
- func (e *EncryptionUtil) GenerateAESKeyBase64() (string, error)
- func (e *EncryptionUtil) GenerateRSAKeyPair() ([]byte, []byte, error)
- func (e *EncryptionUtil) PrivateKeyFromBase64(s string) (*rsa.PrivateKey, error)
- func (e *EncryptionUtil) PublicKeyFromBase64(s string) (*rsa.PublicKey, error)
- func (e *EncryptionUtil) RsaDecryptFromBase64(cipherText string, privateKeyBytes []byte) (string, error)
- func (e *EncryptionUtil) RsaEncryptToBase64(clearText string, publicKeyBytes []byte) (string, error)
- func (e *EncryptionUtil) SignSHA256RSA(inputData string, privateKeyBytes []byte) (string, error)
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)
Click to show internal directories.
Click to hide internal directories.