Revert erroneous fix and fix #287

This commit is contained in:
Moritz F. Kuntze 2019-07-18 14:13:44 +02:00 committed by GitHub
parent 601673808d
commit 3b238c5a81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,10 @@ import (
)
type Key struct {
kr crypto.KeyRing
}
func (k *Key) GetKeyID() string {
if len(k.kr.GetEntities()) > 0 {
return k.kr.GetEntities()[0].PrimaryKey.KeyIdShortString()
} else {
@ -17,10 +21,6 @@ type Key struct {
}
}
func (k *Key) GetKeyID() string {
return k.kr.FirstKeyID
}
func (k *Key) Encrypt(plaintext []byte, armor bool) []byte {
var b bytes.Buffer
var w io.WriteCloser