values

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//PrivateAlgName string
	PrivateAlgName = "Private/Experimental algorithm"
)
View Source
const (
	//Unknown string
	Unknown = "Unknown"
)

Variables

View Source
var S2KEXPBIAS = uint32(6)

S2KEXPBIAS - S2K parameter

Functions

func DumpByteString

func DumpByteString(data byte, f bool) string

DumpByteString returns string

func FileTimeItem

func FileTimeItem(dt *DateTime, dumpFlag bool) *info.Item

FileTimeItem returns UNIXTime instance for Modification time of a file

func Flag2Item

func Flag2Item(flag byte, value string) *info.Item

Flag2Item returns Item instance for flag info.

func KeyExpireItem

func KeyExpireItem(exp *Expire, dumpFlag bool) *info.Item

KeyExpireItem returns new Expire instance

func PubKeyTimeItem

func PubKeyTimeItem(dt *DateTime, dumpFlag bool) *info.Item

PubKeyTimeItem returns UNIXTime instance for Public key creation time

func RawData

func RawData(r *reader.Reader, name string, dumpFlag bool) *info.Item

RawData returns info.Item instance for raw data

func SigExpireItem

func SigExpireItem(exp *Expire, dumpFlag bool) *info.Item

SigExpireItem returns new Expire instance

func SigTimeItem

func SigTimeItem(dt *DateTime, dumpFlag bool) *info.Item

SigTimeItem returns UNIXTime instance for Signature creation time

Types

type CompID

type CompID byte

CompID is Compression Algorithm ID

func (CompID) String

func (ca CompID) String() string

func (CompID) ToItem

func (ca CompID) ToItem(dumpFlag bool) *info.Item

ToItem returns Item instance

type DateTime

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

DateTime class as UNIX time

func NewDateTime

func NewDateTime(r *reader.Reader, utcFlag bool) (*DateTime, error)

NewDateTime returns DateTime instance

func (*DateTime) RFC3339

func (dt *DateTime) RFC3339() string

RFC3339 returns string with RFC3339 format

func (*DateTime) ToItem

func (dt *DateTime) ToItem(name string, dumpFlag bool) *info.Item

ToItem returns Item instance

func (*DateTime) UnixTime

func (dt *DateTime) UnixTime() uint32

UnixTime returns UNIX time value from DateTime

type Dumpdata

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

Dumpdata - raw data for dump

func Dump

func Dump(r *reader.Reader, f bool) *Dumpdata

Dump returns Dumpdata instance

func DumpBytes

func DumpBytes(data []byte, f bool) *Dumpdata

DumpBytes returns Dumpdata instance

func (*Dumpdata) String

func (d *Dumpdata) String() string

type ECParm

type ECParm []byte

ECParm class as ECC parameters

func NewECParm

func NewECParm(r *reader.Reader) (ECParm, error)

NewECParm returns ECParm instance

func (ECParm) ToItem

func (ep ECParm) ToItem(name string, dumpFlag bool) *info.Item

ToItem returns Item instance

type Expire

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

Expire class is Expiration Time

func NewExpire

func NewExpire(r *reader.Reader, start *DateTime) (*Expire, error)

NewExpire returns new Expire instance

func (*Expire) ToItem

func (e *Expire) ToItem(name string, dumpFlag bool) *info.Item

ToItem returns Item instance

type HashID

type HashID byte

HashID is Hash Algorithm ID

func (HashID) String

func (ha HashID) String() string

Stringer for SigID

func (HashID) ToItem

func (ha HashID) ToItem(dumpFlag bool) *info.Item

ToItem returns Item instance

type KeyID

type KeyID uint64

KeyID is Key ID

func NewKeyID

func NewKeyID(octets []byte) KeyID

NewKeyID returns KeyID instance from octets

func (KeyID) String

func (k KeyID) String() string

func (KeyID) ToItem

func (k KeyID) ToItem() *info.Item

ToItem returns Item instance

type LiteralFname

type LiteralFname string

LiteralFname is file name of literal data

func (LiteralFname) ToItem

func (l LiteralFname) ToItem() *info.Item

ToItem returns Item instance

type LiteralFormat

type LiteralFormat byte

LiteralFormat is format of literal data

func (LiteralFormat) String

func (l LiteralFormat) String() string

func (LiteralFormat) ToItem

func (l LiteralFormat) ToItem() *info.Item

ToItem returns Item instance

type MPI

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

MPI class as multi-precision integer

func NewMPI

func NewMPI(r *reader.Reader) (*MPI, error)

NewMPI returns MPI instance

func (*MPI) ToItem

func (mpi *MPI) ToItem(name string, dumpFlag bool) *info.Item

ToItem 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 OID

type OID []byte

OID class as ECC OID

func NewOID

func NewOID(r *reader.Reader) (OID, error)

NewOID returns OID instance

func (OID) String

func (oid OID) String() string

Stringer of OID

func (OID) ToItem

func (oid OID) ToItem(dumpFlag bool) *info.Item

ToItem returns Item instance

type PubID

type PubID byte

PubID is Public-Key Algorithm ID

func (PubID) IsDSA

func (pi PubID) IsDSA() bool

IsDSA returns if DSA algorithm.

func (PubID) IsECDH

func (pi PubID) IsECDH() bool

IsECDH returns if ECDH algorithm.

func (PubID) IsECDSA

func (pi PubID) IsECDSA() bool

IsECDSA returns if ECDSA algorithm.

func (PubID) IsElgamal

func (pi PubID) IsElgamal() bool

IsElgamal returns if Elgamal algorithm.

func (PubID) IsRSA

func (pi PubID) IsRSA() bool

IsRSA returns if RSA algorithm.

func (PubID) String

func (pi PubID) String() string

Stringer for PubID

func (PubID) ToItem

func (pi PubID) ToItem(dumpFlag bool) *info.Item

ToItem returns Item instance

type S2KID

type S2KID byte

S2KID is S2K Algorithm ID

func (S2KID) String

func (sa S2KID) String() string

func (S2KID) ToItem

func (sa S2KID) ToItem(dumpFlag bool) *info.Item

ToItem returns Item instance

type Salt

type Salt []byte

Salt value class

func (Salt) ToItem

func (s Salt) ToItem(dumpFlag bool) *info.Item

ToItem returns Item instance

type SigID

type SigID byte

SigID is Signiture Type ID

func (SigID) String

func (s SigID) String() string

Stringer for SigID

func (SigID) ToItem

func (s SigID) ToItem(dumpFlag bool) *info.Item

ToItem returns Item instance

type Stretch

type Stretch byte

Stretch class for count of stretching hash

func (Stretch) ToItem

func (c Stretch) ToItem() *info.Item

ToItem returns Item instance

type SuboacketID

type SuboacketID byte

SuboacketID is sub-packet type ID

func (SuboacketID) String

func (s SuboacketID) String() string

func (SuboacketID) ToItem

func (s SuboacketID) ToItem(r *reader.Reader, dumpFlag bool) *info.Item

ToItem returns Item instance

type SymID

type SymID byte

SymID is Symmetric-Key Algorithm ID

func (SymID) IVLen

func (s SymID) IVLen() int

IVLen returns length of IV

func (SymID) String

func (s SymID) String() string

Stringer for SymID

func (SymID) ToItem

func (s SymID) ToItem(dumpFlag bool) *info.Item

ToItem returns Item instance

type TagID

type TagID int

TagID is tag ID of packet

func (TagID) String

func (t TagID) String() string

func (TagID) ToItem

func (t TagID) ToItem(r *reader.Reader, dumpFlag bool) *info.Item

ToItem returns Item instance

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) 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

func (v *Version) IsUnknown() bool

IsUnknown return true if unknown version

func (*Version) String

func (v *Version) String() string

func (*Version) ToItem

func (v *Version) ToItem(dumpFlag bool) *info.Item

ToItem returns Item instance

Jump to

Keyboard shortcuts

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