Package org.pgpainless.decryption_verification

# Class MessageMetadata.EncryptedData

java.lang.Object
org.pgpainless.decryption_verification.MessageMetadata.Layer
org.pgpainless.decryption_verification.MessageMetadata.EncryptedData

All Implemented Interfaces:
  `MessageMetadata.Nested`, `MessageMetadata.Packet`

Enclosing class:
  `MessageMetadata`

public static class MessageMetadata.EncryptedData extends MessageMetadata.Layer implements MessageMetadata.Nested

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final SymmetricKeyAlgorithm`
`algorithm`
`protected SubkeyIdentifier`
`decryptionKey`
`protected List<Long>`
`recipients`
`protected SessionKey`
`sessionKey`

### Fields inherited from class org.pgpainless.decryption_verification.MessageMetadata.Layer

`child, depth, MAX_LAYER_DEPTH, rejectedDetachedSignatures, rejectedOnePassSignatures, rejectedPrependedSignatures, verifiedDetachedSignatures, verifiedOnePassSignatures, verifiedPrependedSignatures`

## Constructor Summary

Constructors
Constructor
Description
`EncryptedData(SymmetricKeyAlgorithm algorithm, int depth)`

## Method Summary

Modifier and Type
Method
Description
`SymmetricKeyAlgorithm`
`getAlgorithm()`
Return the `SymmetricKeyAlgorithm` used to encrypt the packet.
`List<Long>`
`getRecipients()`
Return a list of all recipient key ids to which the packet was encrypted for.
`SessionKey`
`getSessionKey()`
Return the `SessionKey` used to decrypt the packet.
`boolean`
`hasNestedChild()`

### Methods inherited from class org.pgpainless.decryption_verification.MessageMetadata.Layer

`getChild, getRejectedDetachedSignatures, getRejectedOnePassSignatures, getRejectedPrependedSignatures, getVerifiedDetachedSignatures, getVerifiedOnePassSignatures, getVerifiedPrependedSignatures`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### algorithm

protected final SymmetricKeyAlgorithm algorithm

### decryptionKey

protected SubkeyIdentifier decryptionKey

### sessionKey

protected SessionKey sessionKey

### recipients

protected List<Long> recipients

## Constructor Details

### EncryptedData

public EncryptedData(@Nonnull SymmetricKeyAlgorithm algorithm, int depth)

## Method Details

### getAlgorithm

@Nonnull public SymmetricKeyAlgorithm getAlgorithm()
Return the `SymmetricKeyAlgorithm` used to encrypt the packet.

Returns:
  symmetric encryption algorithm

### getSessionKey

@Nonnull public SessionKey getSessionKey()
Return the `SessionKey` used to decrypt the packet.

Returns:
  session key

### getRecipients

@Nonnull public List<Long> getRecipients()
Return a list of all recipient key ids to which the packet was encrypted for.

Returns:
  recipients

### hasNestedChild

public boolean hasNestedChild()

Specified by:
  `hasNestedChild` in interface `MessageMetadata.Nested`