Documentation ¶
Index ¶
- func GeneratePrivateKey(size int) (*rsa.PrivateKey, error)
- func RandomIndexes(n, k int) (result []int)
- func SHA256(data interface{}) []byte
- func SHA256Arr(data interface{}) []int
- func SHA256Int(data interface{}) int
- func SHA256Str(data interface{}) string
- func SignWithPrivateKey(data []byte, privateKey *rsa.PrivateKey) ([]byte, error)
- func SignWithPrivateKeyStr(data string, privateKey *rsa.PrivateKey) (string, error)
- func VerifyWithPublicKey(data []byte, signature []byte, publicKey *rsa.PublicKey) error
- func VerifyWithPublicKeyStr(data string, signature string, publicKey *rsa.PublicKey) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratePrivateKey ¶
func GeneratePrivateKey(size int) (*rsa.PrivateKey, error)
func RandomIndexes ¶
func SignWithPrivateKey ¶
func SignWithPrivateKey(data []byte, privateKey *rsa.PrivateKey) ([]byte, error)
func SignWithPrivateKeyStr ¶
func SignWithPrivateKeyStr(data string, privateKey *rsa.PrivateKey) (string, error)
func VerifyWithPublicKey ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.