Documentation
¶
Index ¶
- func Decrypt(encrypted *EncryptedData, pubkey *Pubkey, privkey *Privkey) ([]byte, error)
- func DecryptSymmetric(encrypted *EncryptedData, key []byte) ([]byte, error)
- func SignJsonDetached(obj interface{}, privkey *Privkey) (string, error)
- func VerifyDetached(message, sig []byte, pubkey *Pubkey) error
- func VerifyPubkeySignature(signedPubkey, signerPubkey *Pubkey) error
- func VerifyPubkeyWithPrivkey(pubkey *Pubkey, privkey *Privkey) error
- func VerifySignedCleartext(signed []byte, pubkey *Pubkey) ([]byte, error)
- type EncryptedData
- type EncryptedKeypair
- type EncryptionAndSigningKeys
- type Keypair
- type Privkey
- type Pubkey
- type SignedData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
func Decrypt(encrypted *EncryptedData, pubkey *Pubkey, privkey *Privkey) ([]byte, error)
func DecryptSymmetric ¶
func DecryptSymmetric(encrypted *EncryptedData, key []byte) ([]byte, error)
func SignJsonDetached ¶
func VerifyDetached ¶
func VerifyPubkeySignature ¶
func VerifyPubkeyWithPrivkey ¶
Types ¶
type EncryptedData ¶
func EncryptSymmetric ¶ added in v1.999.15
func EncryptSymmetric(msg []byte, key []byte) *EncryptedData
type EncryptedKeypair ¶
type EncryptedKeypair struct {
Pubkey Pubkey `json:"pubkey"`
EncryptedPrivkey EncryptedData `json:"encryptedPrivkey"`
}
type Privkey ¶
type Privkey struct {
Keys EncryptionAndSigningKeys `json:"keys"`
}
type Pubkey ¶
type Pubkey struct {
Keys EncryptionAndSigningKeys `json:"keys"`
Signature string `json:"signature"`
}
type SignedData ¶
type SignedData struct {
Data string `json:"data"`
}
func SignJson ¶
func SignJson(obj interface{}, privkey *Privkey) (*SignedData, error)
Click to show internal directories.
Click to hide internal directories.