Add decryptMime and refactor package structure

This commit is contained in:
Kay Lukas 2018-09-11 11:09:28 +02:00
parent 07b3a2c739
commit 97e70855b8
27 changed files with 516 additions and 486 deletions

16
internal/armor.go Normal file
View file

@ -0,0 +1,16 @@
package internal
import (
"golang.org/x/crypto/openpgp/armor"
"strings"
)
func UnArmor(input string) (*armor.Block, error) {
io := strings.NewReader(input)
b, err := armor.Decode(io)
if err != nil {
return nil, err
}
return b, nil
}