PublicKeyRing

com.jsuereth.pgp.PublicKeyRing
See thePublicKeyRing companion object
class PublicKeyRing(val nested: PGPPublicKeyRing) extends PublicKeyLike, StreamingSaveable

A collection of public keys, known as a 'ring'.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Adds a key to this key ring and returns the new key ring.

Adds a key to this key ring and returns the new key ring.

Attributes

Adds a key to this key ring and returns the new key ring.

Adds a key to this key ring and returns the new key ring.

Attributes

def apply(id: Long): PublicKey

Gets the public key with a given id from this key ring or throws.

Gets the public key with a given id from this key ring or throws.

Attributes

Returns the default key used to encrypt messages.

Returns the default key used to encrypt messages.

Attributes

A collection that will traverse all keys that can be used to encrypt data.

A collection that will traverse all keys that can be used to encrypt data.

Attributes

def findEncryptionKey(value: String): Option[PublicKey]

Finds the first encryption key that has:

Finds the first encryption key that has:

  • A keyID containing the given hex code
  • A userID containing the given string

Attributes

def findPubKey(value: String): Option[PublicKey]

Finds the first public key that has:

Finds the first public key that has:

  • A keyID containing the given hex code
  • A userID containing the given string

Attributes

def get(id: Long): Option[PublicKey]

Looks for a public key with the given id on this key ring.

Looks for a public key with the given id on this key ring.

Attributes

def masterKey: Option[PublicKey]
def publicKeys: Iterable[PublicKey]

A collection that will traverse all public keys in this key ring.

A collection that will traverse all public keys in this key ring.

Attributes

def removeKey(key: PGPPublicKey): PublicKeyRing

Removes a key from this key ring and returns the new key ring.

Removes a key from this key ring and returns the new key ring.

Attributes

def saveTo(output: OutputStream): Unit

Saves the current entity to an output stream.

Saves the current entity to an output stream.

Attributes

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
def verifyMessageStream(input: InputStream, output: OutputStream): Boolean

Verifies a signed message and extracts the contents.

Verifies a signed message and extracts the contents.

Value parameters

input

The incoming PGP message.

output

The decoded and verified message.

Attributes

def verifySignatureStreams(msg: InputStream, signature: InputStream): Boolean

Verifies a signature stream against an input stream.

Verifies a signature stream against an input stream.

Value parameters

msg

The input stream containing the raw message to verify.

msgName

the name tied in the signature for this object. For a file, this is the filename.

signature

The input stream containing the PGP signature.

Attributes

Inherited methods

def saveToFile(file: File): Unit

Saves the current entity to a file.

Saves the current entity to a file.

Attributes

Inherited from:
StreamingSaveable
def saveToString: String

Saves the current entity into a string.

Saves the current entity into a string.

Attributes

Inherited from:
StreamingSaveable
final def verifyMessageFile(input: File, output: File): Boolean

Reads in a PGP message from a file, verifies the signature and writes to the output file.

Reads in a PGP message from a file, verifies the signature and writes to the output file.

Attributes

Inherited from:
PublicKeyLike
protected def verifyMessageStreamHelper(input: InputStream, output: OutputStream)(getKey: Long => PGPPublicKey): Boolean

Attributes

Inherited from:
PublicKeyLike
final def verifyMessageString(input: String): String

Reads in a PGP message and from a string, verifies the signature and returns the raw content.

Reads in a PGP message and from a string, verifies the signature and returns the raw content.

Attributes

Inherited from:
PublicKeyLike
final def verifySignatureFile(raw: File, signature: File): Boolean

Reads in a raw file, verifies the signature file is valid for this file.

Reads in a raw file, verifies the signature file is valid for this file.

Attributes

Inherited from:
PublicKeyLike
protected def verifySignatureStreamsHelper(msg: InputStream, signature: InputStream)(getKey: Long => PGPPublicKey): Boolean

Verifies that a stream was signed correctly by another stream.

Verifies that a stream was signed correctly by another stream.

Attributes

Throws
KeyNotFoundException

is signature contains an unknown public key.

Inherited from:
PublicKeyLike
final def verifySignatureString(msg: String, signature: String): Boolean

Reads in a PGP message from a string, verifies the signature string is accurate for the message.

Reads in a PGP message from a string, verifies the signature string is accurate for the message.

Attributes

Inherited from:
PublicKeyLike

Concrete fields

val nested: PGPPublicKeyRing