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.
@FunctionalInterface public interface SignatureSubpacketsFunctionCallback to modify the contents of aPGPSignatureSubpacketGenerator. TheOpenPGPV6KeyGeneratoralready 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PGPSignatureSubpacketGeneratorapply(PGPSignatureSubpacketGenerator subpackets)Apply some changes to the givenPGPSignatureSubpacketGeneratorand return the result.
-
-
-
Method Detail
-
apply
PGPSignatureSubpacketGenerator apply(PGPSignatureSubpacketGenerator subpackets)
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
-
-