mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-12-13 07:41:08 +01:00
Kotlin conversion: DecryptionStream
This commit is contained in:
parent
9988ba9940
commit
23f8777c34
3 changed files with 56 additions and 55 deletions
|
|
@ -1,33 +0,0 @@
|
|||
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.pgpainless.decryption_verification;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* Abstract definition of an {@link InputStream} which can be used to decrypt / verify OpenPGP messages.
|
||||
*/
|
||||
public abstract class DecryptionStream extends InputStream {
|
||||
|
||||
/**
|
||||
* Return {@link MessageMetadata metadata} about the decrypted / verified message.
|
||||
* The {@link DecryptionStream} MUST be closed via {@link #close()} before the metadata object can be accessed.
|
||||
*
|
||||
* @return message metadata
|
||||
*/
|
||||
public abstract MessageMetadata getMetadata();
|
||||
|
||||
/**
|
||||
* Return a {@link OpenPgpMetadata} object containing information about the decrypted / verified message.
|
||||
* The {@link DecryptionStream} MUST be closed via {@link #close()} before the metadata object can be accessed.
|
||||
*
|
||||
* @return message metadata
|
||||
* @deprecated use {@link #getMetadata()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public OpenPgpMetadata getResult() {
|
||||
return getMetadata().toLegacyMetadata();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue