constants

package
v3.1.0-proton.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 0 Imported by: 7

Documentation

Overview

Package constants provides a set of common OpenPGP constants.

Index

Constants

View Source
const (
	// ArmorChecksumEnabled defines the default behavior for adding an armor checksum
	// to an armored message.
	//
	// If set to true, an armor checksum is added to the message.
	//
	// If set to false, no armor checksum is added.
	ArmorChecksumEnabled = true
	ArmorHeaderEnabled   = false // can be enabled for debugging at compile time only
	ArmorHeaderVersion   = "GopenPGP " + Version
	ArmorHeaderComment   = "https://gopenpgp.org"
	PGPMessageHeader     = "PGP MESSAGE"
	PGPSignatureHeader   = "PGP SIGNATURE"
	PublicKeyHeader      = "PGP PUBLIC KEY BLOCK"
	PrivateKeyHeader     = "PGP PRIVATE KEY BLOCK"
)

Constants for armored data.

View Source
const (
	ThreeDES  = "3des"
	TripleDES = "tripledes" // Both "3des" and "tripledes" refer to 3DES.
	CAST5     = "cast5"
	AES128    = "aes128"
	AES192    = "aes192"
	AES256    = "aes256"
)

Cipher suite names.

View Source
const (
	SIGNATURE_OK          int = 0
	SIGNATURE_NOT_SIGNED  int = 1
	SIGNATURE_NO_VERIFIER int = 2
	SIGNATURE_FAILED      int = 3
	SIGNATURE_BAD_CONTEXT int = 4
)
View Source
const (
	// StandardSecurity is the default security level.
	StandardSecurity int8 = 0
	// HighSecurity is the high security level.
	HighSecurity int8 = 1
)

SecurityLevel constants. The type is int8 for compatibility with gomobile.

View Source
const (
	Cipher3DES   int8 = 2
	CipherCAST5  int8 = 3
	CipherAES128 int8 = 7
	CipherAES192 int8 = 8
	CipherAES256 int8 = 9
)

Wraps the packet.CipherFunction enum from go-crypto for go-mobile clients. int8 type for go-mobile support.

View Source
const (
	// Use no compression (default).
	NoCompression int8 = 0
	// Use compression defined by the pgp profile.
	DefaultCompression int8 = 1
	// Use ZIP compression.
	ZIPCompression int8 = 2
	// Use ZLIB compression.
	ZLIBCompression int8 = 3
)
View Source
const (
	SigTypeBinary                  int8 = 0x00
	SigTypeText                    int8 = 0x01
	SigTypeGenericCert             int8 = 0x10
	SigTypePersonaCert             int8 = 0x11
	SigTypeCasualCert              int8 = 0x12
	SigTypePositiveCert            int8 = 0x13
	SigTypeSubkeyBinding           int8 = 0x18
	SigTypePrimaryKeyBinding       int8 = 0x19
	SigTypeDirectSignature         int8 = 0x1F
	SigTypeKeyRevocation           int8 = 0x20
	SigTypeSubkeyRevocation        int8 = 0x28
	SigTypeCertificationRevocation int8 = 0x30
)

OpenPGP signature types. int8 type for go-mobile clients.

View Source
const SignatureContextName = "context@proton.ch"
View Source
const Version = "3.1.0"

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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