values

package
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 11 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) *result.Item

FileTimeItem returns UNIXTime instance for Modification time of a file

func Flag2Item

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

Flag2Item returns Item instance for flag result.

func KeyExpireItem

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

KeyExpireItem returns new Expire instance

func PubKeyTimeItem

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

PubKeyTimeItem returns UNIXTime instance for Public key creation time

func RawData

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

RawData returns result.Item instance for raw data

func SigExpireItem

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

SigExpireItem returns new Expire instance

func SigTimeItem

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

SigTimeItem returns UNIXTime instance for Signature creation time

Types

type AEADID

type AEADID byte

AEADID is AEAD Algorithm ID

func (AEADID) IVLen

func (aa AEADID) IVLen() int

IVLen returns length of IV

func (AEADID) String

func (aa AEADID) String() string

func (AEADID) TagLen

func (aa AEADID) TagLen() int

IVLen returns length of authentication tag

func (AEADID) ToItem

func (aa AEADID) ToItem(dumpFlag bool) *result.Item

ToItem returns Item instance

type Argon2Params

type Argon2Params byte

Argon2Params parameters for Argon2

func (Argon2Params) ToItem

func (c Argon2Params) ToItem(name string) *result.Item

ToItem returns Item instance

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) *result.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) IsZero

func (dt *DateTime) IsZero() bool

IsZero returns true if UNIX time is zero value

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) *result.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 ECCPointCompFlag

type ECCPointCompFlag byte

PubID is Public-Key Algorithm ID

func (ECCPointCompFlag) Name

func (f ECCPointCompFlag) Name(algName string) string

func (ECCPointCompFlag) String

func (f ECCPointCompFlag) 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) *result.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) *result.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) *result.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() *result.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() *result.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) Rawdata

func (mpi *MPI) Rawdata() []byte

Rawdata returns MPI raw data

func (*MPI) ToItem

func (mpi *MPI) ToItem(name string, dumpFlag bool) *result.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) *result.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) IsEdDSA

func (pi PubID) IsEdDSA() bool

IsEdDSA returns if EdDSA 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) *result.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) *result.Item

ToItem returns Item instance

type Salt

type Salt []byte

Salt value class

func (Salt) ToItem

func (s Salt) ToItem(dumpFlag bool) *result.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) *result.Item

ToItem returns Item instance

type Stretch

type Stretch byte

Stretch class for count of stretching hash

func (Stretch) ToItem

func (c Stretch) ToItem() *result.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) *result.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) *result.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) *result.Item

ToItem returns Item instance

type Text

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

Text is literal text

func NewLiteralFname

func NewLiteralFname(r *reader.Reader, l int64) (*Text, error)

NewLiteralFname returns new Text instance for file name of literal data

func NewText

func NewText(body []byte, name string) *Text

NewText returns new Text instance

func (*Text) ToItem

func (t *Text) ToItem(dumpFlag bool) *result.Item

type Version

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

Version - information version

func AEADVer

func AEADVer(ver byte) *Version

AEADPacketVer is AEAD Encrypted Data Packet Version

func NewVersion

func NewVersion(ver, cur, draft 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) IsCurrent

func (v *Version) IsCurrent() bool

IsCurrent return true if current version

func (*Version) IsDraft

func (v *Version) IsDraft() bool

IsDraft return true if draft 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) Number

func (v *Version) Number() int

Number returns number of version

func (*Version) String

func (v *Version) String() string

func (*Version) ToItem

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

ToItem returns Item instance

Jump to

Keyboard shortcuts

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