Documentation
¶
Index ¶
Constants ¶
View Source
const Magic = "Ghoten-External-Encryption-Method"
Magic is the magic string the external method needs to output in the Header.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New() method.Descriptor
New creates a new descriptor for the AES-GCM encryption method, which requires a 32-byte key.
Types ¶
type Config ¶
type Config struct {
Keys *keyprovider.Output
EncryptCommand []string
DecryptCommand []string
}
Config is the configuration for the AES-GCM method.
type Header ¶
type Header struct {
// Magic must always be "Ghoten-External-Encryption-Method"
Magic string `json:"magic"`
// Version must always be 1.
Version int `json:"version"`
}
Header is the initial message the external method writes to stdout as a single-line JSON.
type InputV1 ¶
type InputV1 struct {
// Key is the encryption or decryption key for this operation. On the wire, this is base64-encoded. If no key is
// present, this will be nil. The method should exit with a non-zero exit code.
Key []byte `json:"key,omitempty"`
// Payload is the payload to encrypt/decrypt.
Payload []byte `json:"payload"`
}
InputV1 is an encryption/decryption request from Ghoten to the external method. Ghoten writes this message to the standard input of the external method as a JSON message.
Click to show internal directories.
Click to hide internal directories.