clj-pgp.core

Core functions for handling PGP objects.

compression-algorithms

The set of supported compression algorithm keywords.

decode

(decode data)

Decodes PGP objects from an encoded data source. Returns a sequence of decoded objects.

decode-public-key

(decode-public-key data)

Decodes a public key from the given data. Throws an exception if the data does not contain a public key value.

decode-signatures

(decode-signatures data)

Decodes a sequence of signatures from the given data. Throws an exception if the data does not contain a signature list.

Encodable

protocol

Protocol for encodable PGP objects.

members

encode

(encode value)

Encodes a PGP object into a byte array.

encode-ascii

(encode-ascii data)

Encodes a PGP object into an ascii-armored text blob.

hash-algorithms

The set of supported hash algorithm keywords.

hex-fingerprint

(hex-fingerprint value)

Returns the PGP key fingerprint as a hexadecimal string.

hex-id

(hex-id value)

Returns the PGP key identifier for the given value as a hexadecimal string.

key-info

(key-info k)

Returns a map of information about the given key.

KeyAlgorithmIdentifier

protocol

Protocol for values which can use or identify a cryptographic algorithm.

members

key-algorithm

(key-algorithm value)

Returns a keyword identifying the key algorithm used by the given value.

KeyIdentifier

protocol

Protocol for values which can be used as PGP key identifiers.

members

key-id

(key-id value)

Returns the numeric PGP key identifier for the given value.

PrivateKeyContainer

protocol

Protocol for value types which contain or are coercible to a PGP private key.

members

private-key

(private-key this)

Coerces the argument into a PGP private key. Returns nil for other values.

public-key-algorithms

The set of supported public-key algorithm keywords.

PublicKeyContainer

protocol

Protocol for value types which contain or are coercible to a PGP public key.

members

public-key

(public-key this)

Coerces the argument into a PGP public key. Returns nil for other values.

symmetric-key-algorithms

The set of supported symmetric-key algorithm keywords.

unlock-key

(unlock-key seckey passphrase)

Decodes a secret key with a passphrase to obtain the private key.