values

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpByte

func DumpByte(data []byte) string

DumpByte returns string byte-data

func GetBytes added in v0.1.1

func GetBytes(reader io.Reader, size int) ([]byte, error)

GetBytes returns byte slice from stream

func Octets2Int

func Octets2Int(octets []byte) uint64

Octets2Int returns integer from two-octets data

func Octets2IntLE

func Octets2IntLE(octets []byte) uint16

Octets2IntLE returns integer from two-octets data (by little endian)

func RFC3339

func RFC3339(unix int64, utc bool) string

RFC3339 returns string with RFC3339 format

Types

type CompAlg

type CompAlg byte

CompAlg is Compression Algorithm ID

func (CompAlg) Get

func (ca CompAlg) Get() *items.Item

Get returns Item instance

func (CompAlg) String

func (ca CompAlg) String() string

type Expire

type Expire struct {
	// contains filtered or unexported fields
}

Expire - Expiration Time

func KeyExpire

func KeyExpire(buf []byte, start int64, utc bool) *Expire

KeyExpire returns new Expire instance

func NewExpire

func NewExpire(name string, buf []byte, start int64, utc bool) *Expire

NewExpire returns new Expire instance

func SigExpire

func SigExpire(buf []byte, start int64, utc bool) *Expire

SigExpire returns new Expire instance

func (Expire) Get

func (e Expire) Get() *items.Item

Get returns Item instance

type HashAlg

type HashAlg byte

HashAlg is Hash Algorithm ID

func (HashAlg) Get

func (ha HashAlg) Get() *items.Item

Get returns Item instance

func (HashAlg) String

func (ha HashAlg) String() string

type KeyID

type KeyID uint64

KeyID is Key ID

func (KeyID) Get

func (k KeyID) Get() *items.Item

Get returns Item instance

func (KeyID) String added in v0.1.1

func (k KeyID) String() string

type LiteralFname

type LiteralFname string

LiteralFname is file name of literal data

func (LiteralFname) Get

func (l LiteralFname) Get() *items.Item

Get returns Item instance

type LiteralFormat

type LiteralFormat byte

LiteralFormat is format of literal data

func (LiteralFormat) Get

func (l LiteralFormat) Get() *items.Item

Get returns Item instance

func (LiteralFormat) String

func (l LiteralFormat) String() string

type MPI

type MPI struct {
	Raw       *RawData
	BitLength uint16
}

MPI - multi-precision integer

func GetMPI

func GetMPI(reader io.Reader, note string, dump bool) (*MPI, error)

GetMPI returns parsing MPI

func (*MPI) Get

func (mpi *MPI) Get() *items.Item

Get returns Item instance

type Msgs

type Msgs map[int]string

Msgs is type of message list.

func (Msgs) Get

func (m Msgs) Get(i int, def string) string

Get returns message.

type PubAlg

type PubAlg byte

PubAlg is Public-Key Algorithm ID

func (PubAlg) Get

func (pa PubAlg) Get() *items.Item

Get returns Item instance

func (PubAlg) IsDSA

func (pa PubAlg) IsDSA() bool

IsDSA returns if DSA algorithm.

func (PubAlg) IsECDH

func (pa PubAlg) IsECDH() bool

IsECDH returns if ECDH algorithm.

func (PubAlg) IsECDSA

func (pa PubAlg) IsECDSA() bool

IsECDSA returns if ECDSA algorithm.

func (PubAlg) IsElgamal

func (pa PubAlg) IsElgamal() bool

IsElgamal returns if Elgamal algorithm.

func (PubAlg) IsRSA

func (pa PubAlg) IsRSA() bool

IsRSA returns if RSA algorithm.

func (PubAlg) String

func (pa PubAlg) String() string

type RawData

type RawData struct {
	// contains filtered or unexported fields
}

RawData - raw data

func LiteralData

func LiteralData(buf []byte, dump bool) *RawData

LiteralData returns new RawData instance for Literal data

func NewRawData

func NewRawData(name, note string, buf []byte, dump bool) *RawData

NewRawData returns new RawData instance

func OID

func OID(reader io.Reader) (*RawData, error)

OID returns RawData instance with parsing OID

func (RawData) Get

func (r RawData) Get() *items.Item

Get returns Item instance

type S2KAlg

type S2KAlg byte

S2KAlg is S2K Algorithm ID

func (S2KAlg) Get

func (sa S2KAlg) Get() *items.Item

Get returns Item instance

func (S2KAlg) String

func (sa S2KAlg) String() string

type SigType

type SigType byte

SigType is Signiture Type

func (SigType) Get

func (s SigType) Get() *items.Item

Get returns Item instance

func (SigType) String

func (s SigType) String() string

type SymAlg

type SymAlg byte

SymAlg is Symmetric-Key Algorithm ID

func (SymAlg) Get

func (s SymAlg) Get() *items.Item

Get returns Item instance

func (SymAlg) IVLen

func (s SymAlg) IVLen() int

IVLen returns length of IV

func (SymAlg) String

func (s SymAlg) String() string

type Tag

type Tag int

Tag is tag ID of packet

func (Tag) Get

func (t Tag) Get(size int) *items.Item

Get returns Item instance

func (Tag) String

func (t Tag) String() string

type UNIXTime

type UNIXTime struct {
	// contains filtered or unexported fields
}

UNIXTime - UNIX Time

func FileTime

func FileTime(buf []byte, utc bool) *UNIXTime

FileTime returns UNIXTime instance for Modification time of a file

func NewUNIXTime

func NewUNIXTime(name string, buf []byte, utc bool) *UNIXTime

NewUNIXTime returns new UNIXTime instance

func PubKeyTime

func PubKeyTime(buf []byte, utc bool) *UNIXTime

PubKeyTime returns UNIXTime instance for Public key creation time

func SigTime

func SigTime(buf []byte, utc bool) *UNIXTime

SigTime returns UNIXTime instance for Signature creation time

func (*UNIXTime) Get

func (u *UNIXTime) Get() *items.Item

Get returns Item instance

func (*UNIXTime) RFC3339

func (u *UNIXTime) RFC3339() string

RFC3339 returns string with RFC3339 format

func (*UNIXTime) Unix

func (u *UNIXTime) Unix() int64

Unix returns UNIX Time

type Version

type Version struct {
	// contains filtered or unexported fields
}

Version - information version

func NewVersion

func NewVersion(ver, cur byte) Version

NewVersion returns new Version instance

func OneSigVer

func OneSigVer(ver byte) Version

OneSigVer is One-Pass Signature Packet Version

func PubSessKeyVer

func PubSessKeyVer(ver byte) Version

PubSessKeyVer is Public-Key Encrypted Session Key Packet Version

func PubVer

func PubVer(ver byte) Version

PubVer is Public-Key Packet Version

func SigVer

func SigVer(ver byte) Version

SigVer is Signiture Packet Version

func SymSessKeyVer

func SymSessKeyVer(ver byte) Version

SymSessKeyVer is Symmetric-Key Encrypted Session Key Packet Version

func (Version) Get

func (v Version) Get() *items.Item

Get returns Item instance

func (Version) IsNew

func (v Version) IsNew() bool

IsNew return true if new version

func (Version) IsOld

func (v Version) IsOld() bool

IsOld return true if old version

func (Version) IsUnknown added in v0.1.1

func (v Version) IsUnknown() bool

IsUnknown return true if unknown version

func (Version) String added in v0.1.1

func (v Version) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL