Documentation ¶
Index ¶
- Constants
- func GenerateKeyFile(privateKeyFile, publickKeyFile string) error
- func GenerateKeyPemFile(privateKeyFile, publickKeyFile, certPath string) error
- func PrivateKey(bs []byte) (ed25519.PrivateKey, error)
- func PrivateKeyFromB64(b64 string) (ed25519.PrivateKey, error)
- func PrivateKeyFromPem(path string) (ed25519.PrivateKey, error)
- func PublicKey(bs []byte) (ed25519.PublicKey, error)
- func PublicKeyFromB64(b64 string) (ed25519.PublicKey, error)
- func PublicKeyFromPem(path string) (ed25519.PublicKey, error)
- func Sign(privateKey ed25519.PrivateKey, message []byte) []byte
- func SignFile(path string, message []byte) ([]byte, error)
- func SignString(privateKey ed25519.PrivateKey, message string) (string, error)
- func Verify(publicKey ed25519.PublicKey, message, sig []byte) bool
- func VerifyFile(path string, message, sig []byte) (bool, error)
- func VerifyString(publicKey ed25519.PublicKey, message, sig string) (bool, error)
Constants ¶
View Source
const ( PRIVATE_KEY = "ED25519 PRIVATE KEY" PUBLIC_KEY = "PUBLIC KEY" )
Variables ¶
This section is empty.
Functions ¶
func GenerateKeyFile ¶
func GenerateKeyPemFile ¶
func PrivateKey ¶
func PrivateKey(bs []byte) (ed25519.PrivateKey, error)
func PrivateKeyFromB64 ¶
func PrivateKeyFromB64(b64 string) (ed25519.PrivateKey, error)
func PrivateKeyFromPem ¶
func PrivateKeyFromPem(path string) (ed25519.PrivateKey, error)
func SignString ¶ added in v1.0.1
func SignString(privateKey ed25519.PrivateKey, message string) (string, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.