From 3a79b43550efd26a81eb3df1acd3c295c2679af0 Mon Sep 17 00:00:00 2001 From: zhj4478 Date: Tue, 5 Jun 2018 11:58:33 -0700 Subject: [PATCH] export a armor key func --- armor.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/armor.go b/armor.go index 8e744e0..0bac15b 100644 --- a/armor.go +++ b/armor.go @@ -14,6 +14,11 @@ const ( pgpPrivateBlockType string = "PGP PRIVATE KEY BLOCK" ) +// ArmorKey make bytes input key to armor format +func ArmorKey(input []byte) (string, error) { + return ArmorWithType(input, pgpPublicBlockType) +} + // ArmorWithType make bytes input to armor format func ArmorWithType(input []byte, armorType string) (string, error) { var b bytes.Buffer