Documentation ¶
Overview ¶
Package armor contains a set of helper methods for armoring and unarmoring data.
Index ¶
- func ArmorKey(input []byte) (string, error)
- func ArmorPGPMessage(signature []byte) (string, error)
- func ArmorPGPMessageBytes(signature []byte) ([]byte, error)
- func ArmorPGPSignature(signature []byte) (string, error)
- func ArmorPGPSignatureBinary(signature []byte) ([]byte, error)
- func ArmorReader(in io.Reader) (io.Reader, error)
- func ArmorWithType(input []byte, armorType string) (string, error)
- func ArmorWithTypeAndCustomHeaders(input []byte, armorType, version, comment string) (string, error)
- func ArmorWithTypeAndCustomHeadersBytes(input []byte, armorType, version, comment string) ([]byte, error)
- func ArmorWithTypeBytes(input []byte, armorType string) ([]byte, error)
- func ArmorWriterWithType(w io.Writer, armorType string) (io.WriteCloser, error)
- func ArmorWriterWithTypeAndCustomHeaders(w io.Writer, armorType, version, comment string) (io.WriteCloser, error)
- func IsPGPArmored(in io.Reader) (io.Reader, bool)
- func Unarmor(input string) ([]byte, error)
- func UnarmorBytes(input []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArmorPGPMessage ¶
func ArmorPGPMessageBytes ¶
func ArmorPGPSignature ¶
func ArmorPGPSignatureBinary ¶
func ArmorReader ¶
ArmorReader returns a io.Reader which, when read, reads unarmored data from in.
func ArmorWithType ¶
ArmorWithType armors input with the given armorType.
func ArmorWithTypeAndCustomHeaders ¶
func ArmorWithTypeAndCustomHeaders(input []byte, armorType, version, comment string) (string, error)
ArmorWithTypeAndCustomHeaders armors input with the given armorType and headers.
func ArmorWithTypeAndCustomHeadersBytes ¶
func ArmorWithTypeAndCustomHeadersBytes(input []byte, armorType, version, comment string) ([]byte, error)
ArmorWithTypeAndCustomHeadersBytes armors input with the given armorType and headers.
func ArmorWithTypeBytes ¶
ArmorWithTypeBytes armors input with the given armorType.
func ArmorWriterWithType ¶
ArmorWriterWithType returns a io.WriteCloser which, when written to, writes armored data to w with the given armorType.
func ArmorWriterWithTypeAndCustomHeaders ¶
func ArmorWriterWithTypeAndCustomHeaders(w io.Writer, armorType, version, comment string) (io.WriteCloser, error)
ArmorWriterWithTypeAndCustomHeaders returns a io.WriteCloser, which armors input with the given armorType and headers.
func IsPGPArmored ¶
IsPGPArmored reads a prefix from the reader and checks if it is equal to a pgp armored message prefix. Returns an io.Reader that is reset to the state of the in reader, and a bool that indicates if there is a match. If reading from the reader fails, the returned bool is set to false.
func UnarmorBytes ¶
UnarmorBytes unarmors an armored input into a byte array.
Types ¶
This section is empty.