pgpainless/pgpainless-core/src/main/kotlin/org/pgpainless/decryption_verification/DecryptionStream.kt

22 lines
618 B
Kotlin
Raw Normal View History

2023-08-30 14:12:05 +02:00
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
package org.pgpainless.decryption_verification
import java.io.InputStream
/**
* Abstract definition of an [InputStream] which can be used to decrypt / verify OpenPGP messages.
*/
abstract class DecryptionStream : InputStream() {
2023-08-30 14:12:05 +02:00
/**
* Return [MessageMetadata] about the decrypted / verified message. The [DecryptionStream] MUST
* be closed via [close] before the metadata object can be accessed.
2023-08-30 14:12:05 +02:00
*
* @return message metadata
*/
abstract val metadata: MessageMetadata
}