Documentation ¶
Index ¶
- Constants
- func ByteFingerPrint2FP16(raw []byte) string
- func CRC24(d []byte) uint32
- func CanDecodeBase64(s string) bool
- func CompareFingerPrint(fpA, fpB string) bool
- func ContextWithValues(parent context.Context, values map[string]interface{}) context.Context
- func CopyFile(src, dst string) error
- func CopyFiles(src, dst string) error
- func CreateEntityForSubKey(masterFingerPrint string, pubKey *packet.PublicKey, privKey *packet.PrivateKey) *openpgp.Entity
- func CreateEntityFromKeys(name, comment, email string, lifeTimeInSecs uint32, pubKey *packet.PublicKey, ...) *openpgp.Entity
- func ExtractIdentifierFields(identifier string) (name, email, comment string)
- func FPto16(fingerprint string) string
- func FolderExists(folder string) bool
- func GPG2Quanto(signature, fingerPrint, hash string) string
- func GeneratePassword() string
- func GenerateTag() string
- func GetFingerPrintFromKey(armored string) (string, error)
- func GetFingerPrintsFromEncryptedMessage(armored string) ([]string, error)
- func GetFingerPrintsFromEncryptedMessageRaw(rawB64Data string) ([]string, error)
- func GetFingerPrintsFromKey(armored string) ([]string, error)
- func GetRequestIDFromContext(ctx context.Context) string
- func IdentityMapToArray(m map[string]*openpgp.Identity) []*openpgp.Identity
- func IsASCIIArmored(data string) bool
- func IssuerKeyIdToFP16(issuerKeyId uint64) string
- func Quanto2GPG(signature string) string
- func ReadKey(armored string) (openpgp.EntityList, error)
- func ReadKeyToEntity(asciiArmored string) (*openpgp.Entity, error)
- func SignatureFix(sig string) string
- func SimpleIdentitiesToString(ids []*openpgp.Identity) string
- func StringIndexOf(v string, a []string) int
- func TruncateFieldForDisplay(fieldData string) string
- type ContextField
Constants ¶
View Source
const ( GPG_MD5 = 1 GPG_SHA1 = 2 GPG_RIPEMD160 = 3 GPG_SHA256 = 8 GPG_SHA384 = 9 GPG_SHA512 = 10 GPG_SHA224 = 11 )
View Source
const DefaultTag = "00000000+0000+0000+0000+000000000000"
DefaultTag represents a default tag to be used in logs
Variables ¶
This section is empty.
Functions ¶
func ByteFingerPrint2FP16 ¶
func CRC24 ¶
CRC24 calculates the OpenPGP checksum as specified in RFC 4880, section 6.1
func CanDecodeBase64 ¶
CanDecodeBase64 returns true if s is a valid base64
func CompareFingerPrint ¶
func ContextWithValues ¶
func CreateEntityForSubKey ¶
func CreateEntityFromKeys ¶
func ExtractIdentifierFields ¶
func FPto16 ¶ added in v1.4.0
FPto16 returns a 16 byte fingerprint for the specified fingerprint if len(fingerprint) < 16 it returns the same string in upper case
func FolderExists ¶
func GPG2Quanto ¶
func GeneratePassword ¶
func GeneratePassword() string
func GenerateTag ¶
func GenerateTag() string
GenerateTag generates a new UUID tag with - replaced by +
func GetFingerPrintFromKey ¶
func GetFingerPrintsFromKey ¶
func GetRequestIDFromContext ¶
func IdentityMapToArray ¶
func IsASCIIArmored ¶
IsASCIIArmored returns true if data is ascii armored
func IssuerKeyIdToFP16 ¶
func Quanto2GPG ¶
func StringIndexOf ¶
func TruncateFieldForDisplay ¶
TruncateFieldForDisplay truncates the field to display in log files
Types ¶
type ContextField ¶
type ContextField string
const ( CtxRequestID ContextField = "requestID" CtxDatabaseHandler ContextField = "dbHandler" )
Click to show internal directories.
Click to hide internal directories.