Top Description Methods
org.bouncycastle.openpgp.api

public Interface SignatureSubpacketsFunction

Annotations
@FunctionalInterface
Imports
org.bouncycastle.openpgp.PGPSignatureSubpacketGenerator, .PGPSignatureSubpacketVector

Callback to modify the contents of a PGPSignatureSubpacketGenerator. The OpenPGPV6KeyGenerator already prepopulates the hashed subpacket areas of signatures during key generation. This callback is useful to apply custom changes to the hashed subpacket area during the generation process.

Method Summary

Modifier and TypeMethod and Description
public PGPSignatureSubpacketGenerator

Returns:

non-null modified subpackets
apply
(PGPSignatureSubpacketGenerator
original subpackets
subpackets
)

Apply some changes to the given PGPSignatureSubpacketGenerator and return the result.

Method Detail

applyback to summary
public PGPSignatureSubpacketGenerator apply(PGPSignatureSubpacketGenerator subpackets)

Apply some changes to the given PGPSignatureSubpacketGenerator and return the result. It is also possible to replace the whole PGPSignatureSubpacketGenerator by returning another instance. Tipp: In order to replace a subpacket, make sure to prevent duplicates by first removing subpackets of the same type using PGPSignatureSubpacketGenerator#removePacketsOfType(int). To inspect the current contents of the generator, it is best to call PGPSignatureSubpacketGenerator#generate() and in turn inspect its contents using PGPSignatureSubpacketVector#toArray().

Parameters
subpackets:PGPSignatureSubpacketGenerator

original subpackets

Returns:PGPSignatureSubpacketGenerator

non-null modified subpackets