Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type EncryptionHelper ¶
type EncryptionHelper struct {
// contains filtered or unexported fields
}
func GetEncryptionInstance ¶
func GetEncryptionInstance() (*EncryptionHelper, error)
GetInstance returns a singleton instance of EncryptionHelper
func (*EncryptionHelper) DecryptBytes ¶
func (eh *EncryptionHelper) DecryptBytes(encryptedData string) ([]byte, error)
DecryptBytes decrypts a base64 encoded encrypted data to bytes
func (*EncryptionHelper) EncryptBytes ¶
func (eh *EncryptionHelper) EncryptBytes(data []byte) (string, error)
EncryptBytes encrypts byte array and returns base64 encoded result
type SensitiveData ¶
type SensitiveData string
SensitiveData represents an encrypted string
func NewSensitiveData ¶
func NewSensitiveData(plaintext string) (SensitiveData, error)
NewSensitiveData creates a new encrypted sensitive data
func (SensitiveData) Decrypt ¶
func (s SensitiveData) Decrypt() (string, error)
Decrypt decrypts the sensitive data
func (SensitiveData) String ¶
func (s SensitiveData) String() string
String implements Stringer interface
Click to show internal directories.
Click to hide internal directories.