1 package org.bouncycastle.crypto; 2 3 /** 4 * Signer with message recovery. 5 */ 6 public interface SignerWithRecovery 7 extends Signer 8 { 9 /** 10 * Returns true if the signer has recovered the full message as 11 * part of signature verification. 12 * 13 * @return true if full message recovered. 14 */ hasFullMessage()15 public boolean hasFullMessage(); 16 17 /** 18 * Returns a reference to what message was recovered (if any). 19 * 20 * @return full/partial message, null if nothing. 21 */ getRecoveredMessage()22 public byte[] getRecoveredMessage(); 23 24 /** 25 * Perform an update with the recovered message before adding any other data. This must 26 * be the first update method called, and calling it will result in the signer assuming 27 * that further calls to update will include message content past what is recoverable. 28 * 29 * @param signature the signature that we are in the process of verifying. 30 * @throws IllegalStateException 31 */ updateWithRecoveredMessage(byte[] signature)32 public void updateWithRecoveredMessage(byte[] signature) 33 throws InvalidCipherTextException; 34 } 35