001// SPDX-FileCopyrightText: 2021 Paul Schaub <vanitasvitae@fsfe.org> 002// 003// SPDX-License-Identifier: Apache-2.0 004 005package org.pgpainless.signature.subpackets; 006 007public interface SignatureSubpacketCallback<S extends BaseSignatureSubpackets> { 008 009 /** 010 * Callback method that can be used to modify the hashed subpackets of a signature. 011 * 012 * @param hashedSubpackets hashed subpackets 013 */ 014 default void modifyHashedSubpackets(S hashedSubpackets) { 015 016 } 017 018 /** 019 * Callback method that can be used to modify the unhashed subpackets of a signature. 020 * 021 * @param unhashedSubpackets unhashed subpackets 022 */ 023 default void modifyUnhashedSubpackets(S unhashedSubpackets) { 024 025 } 026}