Documentation ¶
Index ¶
- func ComputePublicKey(secret []byte) ([]byte, error)
- func ComputeSharedKey(senderKey []byte, publicKey []byte) []byte
- func DecryptPayload(sharedKey []byte, encrypted_payload []byte, nounce []byte) []byte
- func EncryptPayload(sharedKey []byte, payload []byte, nounce []byte) []byte
- func GenerateKeys(generateKeys string)
- func GetPrivateKey(publicKey []byte) []byte
- func GetPublicKeys() [][]byte
- func NewRandomKey() ([]byte, error)
- func NewRandomNonce() ([]byte, error)
- func PutKeyPair(pair KeyPair)
- func WritePrivateKeyFile(key string, filename string) error
- func WritePublicKeyFile(key string, filename string) error
- type KeyPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputePublicKey ¶
func ComputeSharedKey ¶
func DecryptPayload ¶
func GenerateKeys ¶
func GenerateKeys(generateKeys string)
func GetPrivateKey ¶
func GetPublicKeys ¶
func GetPublicKeys() [][]byte
func NewRandomKey ¶
func NewRandomNonce ¶
func PutKeyPair ¶
func PutKeyPair(pair KeyPair)
func WritePrivateKeyFile ¶
WritePrivateKeyFile creates a json file with the private key
func WritePublicKeyFile ¶
WritePublicKeyFile creates a file with the pubKey
Types ¶
Click to show internal directories.
Click to hide internal directories.