Documentation ¶
Index ¶
- Constants
- type EncryptionBase
- func (base *EncryptionBase) Decrypt(data []byte) ([]byte, error)
- func (base *EncryptionBase) DecryptFile(filePathIn, filePathOut string) error
- func (base *EncryptionBase) DecryptRSA(secretMessage []byte) ([]byte, error)
- func (base *EncryptionBase) Encrypt(data []byte) ([]byte, error)
- func (base *EncryptionBase) EncryptFile(filePathIn, filePathOut string) error
- func (base *EncryptionBase) EncryptRSA(secretMessage []byte) ([]byte, error)
- func (base *EncryptionBase) GenerateRSAKey(bitSize int) (rsaKey *Keys, err error)
- func (base *EncryptionBase) SetEncodeBase64(useEncode64 bool) *EncryptionBase
- func (base *EncryptionBase) SetPassphrase(passphrase string) *EncryptionBase
- func (base *EncryptionBase) SetRsaPrivateKey(key string) *EncryptionBase
- func (base *EncryptionBase) SetRsaPublicKey(key string) *EncryptionBase
- func (base *EncryptionBase) SetSignPrivateKey(key string) *EncryptionBase
- func (base *EncryptionBase) SetSignPublicKey(key string) *EncryptionBase
- func (base *EncryptionBase) SetUseRandomness(useRandomness bool, keyRandom string) *EncryptionBase
- func (base *EncryptionBase) SignData(message string) (signature string, err error)
- func (base *EncryptionBase) VerifyData(message string, signature []byte) (isVerified bool, err error)
- type Keys
Constants ¶
View Source
const BufferSize int = 4096
View Source
const HMACSize = sha256.Size
View Source
const IvSize int = 16
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncryptionBase ¶
type EncryptionBase struct {
// contains filtered or unexported fields
}
func NewEncryptionBase ¶
func NewEncryptionBase() *EncryptionBase
func (*EncryptionBase) DecryptFile ¶
func (base *EncryptionBase) DecryptFile(filePathIn, filePathOut string) error
func (*EncryptionBase) DecryptRSA ¶
func (base *EncryptionBase) DecryptRSA(secretMessage []byte) ([]byte, error)
func (*EncryptionBase) EncryptFile ¶
func (base *EncryptionBase) EncryptFile(filePathIn, filePathOut string) error
func (*EncryptionBase) EncryptRSA ¶
func (base *EncryptionBase) EncryptRSA(secretMessage []byte) ([]byte, error)
func (*EncryptionBase) GenerateRSAKey ¶
func (base *EncryptionBase) GenerateRSAKey(bitSize int) (rsaKey *Keys, err error)
func (*EncryptionBase) SetEncodeBase64 ¶
func (base *EncryptionBase) SetEncodeBase64(useEncode64 bool) *EncryptionBase
func (*EncryptionBase) SetPassphrase ¶
func (base *EncryptionBase) SetPassphrase(passphrase string) *EncryptionBase
func (*EncryptionBase) SetRsaPrivateKey ¶
func (base *EncryptionBase) SetRsaPrivateKey(key string) *EncryptionBase
func (*EncryptionBase) SetRsaPublicKey ¶
func (base *EncryptionBase) SetRsaPublicKey(key string) *EncryptionBase
func (*EncryptionBase) SetSignPrivateKey ¶
func (base *EncryptionBase) SetSignPrivateKey(key string) *EncryptionBase
func (*EncryptionBase) SetSignPublicKey ¶
func (base *EncryptionBase) SetSignPublicKey(key string) *EncryptionBase
func (*EncryptionBase) SetUseRandomness ¶
func (base *EncryptionBase) SetUseRandomness(useRandomness bool, keyRandom string) *EncryptionBase
func (*EncryptionBase) SignData ¶
func (base *EncryptionBase) SignData(message string) (signature string, err error)
func (*EncryptionBase) VerifyData ¶
func (base *EncryptionBase) VerifyData(message string, signature []byte) (isVerified bool, err error)
Click to show internal directories.
Click to hide internal directories.