Documentation ¶
Index ¶
- func GenerateRSAKey(path string, size int) (*rsa.PrivateKey, error)
- func GenerateRandomString(n int) string
- func GetPublicKeyPem(privateKey *rsa.PrivateKey) (string, error)
- func ReadRSAKeyFromFile(path string) (*rsa.PrivateKey, error)
- func SignWithRSA(data []byte, privateKey *rsa.PrivateKey) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRSAKey ¶
func GenerateRSAKey(path string, size int) (*rsa.PrivateKey, error)
func GenerateRandomString ¶
Cool random function stolen from https://stackoverflow.com/a/31832326 that uses some black magic(totaly not overengineering).
func GetPublicKeyPem ¶
func GetPublicKeyPem(privateKey *rsa.PrivateKey) (string, error)
func ReadRSAKeyFromFile ¶
func ReadRSAKeyFromFile(path string) (*rsa.PrivateKey, error)
func SignWithRSA ¶
func SignWithRSA(data []byte, privateKey *rsa.PrivateKey) ([]byte, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.