Documentation ¶
Index ¶
- Variables
- func DecryptDataAES(data []byte, key []byte) ([]byte, error)
- func EncryptDataAES(data []byte, key []byte) ([]byte, error)
- func EncryptDecryptData(data []byte, key []byte) error
- func GenerateKeys() (*rsa.PrivateKey, error)
- func SaveKeysToFile(private *rsa.PrivateKey, pub, prv io.Writer) error
- func SignData(data []byte, privateKey string) ([]byte, error)
- func SignVerify(data, sign []byte, publicKey string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKeyShortedThanData = errors.New("the length of key must be great or equal than length of data")
Functions ¶
func EncryptDecryptData ¶
func GenerateKeys ¶
func GenerateKeys() (*rsa.PrivateKey, error)
func SaveKeysToFile ¶
func SaveKeysToFile(private *rsa.PrivateKey, pub, prv io.Writer) error
func SignVerify ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.