Documentation ¶
Overview ¶
Package encoding implements openpgp packet field encodings as specified in RFC 4880 and 6637.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field interface { // Bytes returns the decoded data. Bytes() []byte // BitLength is the size in bits of the decoded data. BitLength() uint16 // EncodedBytes returns the encoded data. EncodedBytes() []byte // EncodedLength is the size in bytes of the encoded data. EncodedLength() uint16 // ReadFrom reads the next Field from r. ReadFrom(r io.Reader) (int64, error) }
Field is an encoded field of an openpgp packet.
type MPI ¶
type MPI struct {
// contains filtered or unexported fields
}
An MPI is used to store the contents of a big integer, along with the bit length that was specified in the original input. This allows the MPI to be reserialized exactly.
func (*MPI) EncodedBytes ¶
EncodedBytes returns the encoded data.
func (*MPI) EncodedLength ¶
EncodedLength is the size in bytes of the encoded data.
type OID ¶
type OID struct {
// contains filtered or unexported fields
}
OID is used to store a variable-length field with a one-octet size prefix. See https://tools.ietf.org/html/rfc6637#section-9.
func (*OID) EncodedBytes ¶
EncodedBytes returns the encoded data.
func (*OID) EncodedLength ¶
EncodedLength is the size in bytes of the encoded data.
type ShortByteString ¶
type ShortByteString struct {
// contains filtered or unexported fields
}
func NewShortByteString ¶
func NewShortByteString(data []byte) *ShortByteString
func (*ShortByteString) BitLength ¶
func (byteString *ShortByteString) BitLength() uint16
func (*ShortByteString) Bytes ¶
func (byteString *ShortByteString) Bytes() []byte
func (*ShortByteString) EncodedBytes ¶
func (byteString *ShortByteString) EncodedBytes() []byte
func (*ShortByteString) EncodedLength ¶
func (byteString *ShortByteString) EncodedLength() uint16