Package org.bouncycastle.openpgp.api
Interface SignatureSubpacketsFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
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 TypeMethodDescriptionapply(PGPSignatureSubpacketGenerator subpackets) Apply some changes to the givenPGPSignatureSubpacketGeneratorand return the result.
-
Method Details
-
apply
Apply some changes to the givenPGPSignatureSubpacketGeneratorand return the result. It is also possible to replace the wholePGPSignatureSubpacketGeneratorby returning another instance. Tipp: In order to replace a subpacket, make sure to prevent duplicates by first removing subpackets of the same type usingPGPSignatureSubpacketGenerator.removePacketsOfType(int). To inspect the current contents of the generator, it is best to callPGPSignatureSubpacketGenerator.generate()and in turn inspect its contents usingPGPSignatureSubpacketVector.toArray().- Parameters:
subpackets- original subpackets- Returns:
- non-null modified subpackets
-