Versions in this module Expand all Collapse all v0 v0.1.2 Feb 4, 2020 v0.1.2-mtrmac.1 Feb 4, 2020 v0.1.1 Jan 18, 2020 Changes in this version + const SeekCur + const SeekEnd + const SeekSet + var Version string + func EngineCheckVersion(p Protocol) error + func SetEngineInfo(proto Protocol, fileName, homeDir string) error + type AssuanDataCallback func(data []byte) error + type AssuanInquireCallback func(name, args string) error + type AssuanStatusCallback func(status, args string) error + type Callback func(uidHint string, prevWasBad bool, f *os.File) error + type Context struct + Key *Key + KeyError error + func New() (*Context, error) + func (c *Context) Armor() bool + func (c *Context) AssuanSend(cmd string, data AssuanDataCallback, inquiry AssuanInquireCallback, ...) error + func (c *Context) Decrypt(ciphertext, plaintext *Data) error + func (c *Context) DecryptVerify(ciphertext, plaintext *Data) error + func (c *Context) Encrypt(recipients []*Key, flags EncryptFlag, plaintext, ciphertext *Data) error + func (c *Context) EngineInfo() *EngineInfo + func (c *Context) Export(pattern string, mode ExportModeFlags, data *Data) error + func (c *Context) GetKey(fingerprint string, secret bool) (*Key, error) + func (c *Context) Import(keyData *Data) (*ImportResult, error) + func (c *Context) KeyListEnd() error + func (c *Context) KeyListMode() KeyListMode + func (c *Context) KeyListNext() bool + func (c *Context) KeyListStart(pattern string, secretOnly bool) error + func (c *Context) Protocol() Protocol + func (c *Context) Release() + func (c *Context) SetArmor(yes bool) + func (c *Context) SetCallback(callback Callback) error + func (c *Context) SetEngineInfo(proto Protocol, fileName, homeDir string) error + func (c *Context) SetKeyListMode(m KeyListMode) error + func (c *Context) SetProtocol(p Protocol) error + func (c *Context) SetTextMode(yes bool) + func (c *Context) Sign(signers []*Key, plain, sig *Data, mode SigMode) error + func (c *Context) TextMode() bool + func (c *Context) Verify(sig, signedText, plain *Data) (string, []Signature, error) + type Data struct + func Decrypt(r io.Reader) (*Data, error) + func NewData() (*Data, error) + func NewDataBytes(b []byte) (*Data, error) + func NewDataFile(f *os.File) (*Data, error) + func NewDataReadWriteSeeker(rw io.ReadWriteSeeker) (*Data, error) + func NewDataReadWriter(rw io.ReadWriter) (*Data, error) + func NewDataReader(r io.Reader) (*Data, error) + func NewDataWriter(w io.Writer) (*Data, error) + func (d *Data) Close() error + func (d *Data) Name() string + func (d *Data) Read(p []byte) (int, error) + func (d *Data) Seek(offset int64, whence int) (int64, error) + func (d *Data) Write(p []byte) (int, error) + type EncryptFlag uint + const EncryptAlwaysTrust + const EncryptExceptSign + const EncryptNoEncryptTo + const EncryptPrepare + type EngineInfo struct + func GetEngineInfo() (*EngineInfo, error) + func (e *EngineInfo) FileName() string + func (e *EngineInfo) HomeDir() string + func (e *EngineInfo) Next() *EngineInfo + func (e *EngineInfo) Protocol() Protocol + func (e *EngineInfo) RequiredVersion() string + func (e *EngineInfo) Version() string + type Error struct + func (e Error) Code() ErrorCode + func (e Error) Error() string + type ErrorCode int + const ErrorEOF + const ErrorNoError + type ExportModeFlags uint + const ExportModeExtern + const ExportModeMinimal + type HashAlgo int + type ImportResult struct + Considered int + Imported int + ImportedRSA int + Imports []ImportStatus + NewRevocations int + NewSignatures int + NewSubKeys int + NewUserIDs int + NoUserID int + NotImported int + SecretImported int + SecretRead int + SecretUnchanged int + Unchanged int + type ImportStatus struct + Fingerprint string + Result error + Status ImportStatusFlags + type ImportStatusFlags uint + const ImportNew + const ImportSIG + const ImportSecret + const ImportSubKey + const ImportUID + type Key struct + func FindKeys(pattern string, secretOnly bool) ([]*Key, error) + func (k *Key) CanAuthenticate() bool + func (k *Key) CanCertify() bool + func (k *Key) CanEncrypt() bool + func (k *Key) CanSign() bool + func (k *Key) ChainID() string + func (k *Key) Disabled() bool + func (k *Key) Expired() bool + func (k *Key) Invalid() bool + func (k *Key) IsQualified() bool + func (k *Key) IssuerName() string + func (k *Key) IssuerSerial() string + func (k *Key) KeyListMode() KeyListMode + func (k *Key) OwnerTrust() Validity + func (k *Key) Protocol() Protocol + func (k *Key) Release() + func (k *Key) Revoked() bool + func (k *Key) Secret() bool + func (k *Key) SubKeys() *SubKey + func (k *Key) UserIDs() *UserID + type KeyListMode uint + const KeyListModeEphemeral + const KeyListModeExtern + const KeyListModeLocal + const KeyListModeModeValidate + const KeyListModeSigNotations + const KeyListModeSigs + type PinEntryMode int + type Protocol int + const ProtocolAssuan + const ProtocolCMS + const ProtocolDefault + const ProtocolG13 + const ProtocolGPGConf + const ProtocolOpenPGP + const ProtocolUIServer + const ProtocolUnknown + type PubkeyAlgo int + type SigMode int + const SigModeClear + const SigModeDetach + const SigModeNormal + type SigSum int + const SigSumBadPolicy + const SigSumCRLMissing + const SigSumCRLTooOld + const SigSumGreen + const SigSumKeyExpired + const SigSumKeyMissing + const SigSumKeyRevoked + const SigSumRed + const SigSumSigExpired + const SigSumSysError + const SigSumValid + type Signature struct + ChainModel bool + ExpTimestamp time.Time + Fingerprint string + HashAlgo HashAlgo + PKATrust uint + PubkeyAlgo PubkeyAlgo + Status error + Summary SigSum + Timestamp time.Time + Validity Validity + ValidityReason error + WrongKeyUsage bool + type SubKey struct + func (k *SubKey) CardNumber() string + func (k *SubKey) Created() time.Time + func (k *SubKey) Disabled() bool + func (k *SubKey) Expired() bool + func (k *SubKey) Expires() time.Time + func (k *SubKey) Fingerprint() string + func (k *SubKey) Invalid() bool + func (k *SubKey) KeyID() string + func (k *SubKey) Next() *SubKey + func (k *SubKey) Revoked() bool + func (k *SubKey) Secret() bool + type UserID struct + func (u *UserID) Comment() string + func (u *UserID) Email() string + func (u *UserID) Invalid() bool + func (u *UserID) Name() string + func (u *UserID) Next() *UserID + func (u *UserID) Revoked() bool + func (u *UserID) UID() string + func (u *UserID) Validity() Validity + type Validity int + const ValidityFull + const ValidityMarginal + const ValidityNever + const ValidityUltimate + const ValidityUndefined + const ValidityUnknown