sop.operation.DetachedVerify.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sop-java Show documentation
Show all versions of sop-java Show documentation
Stateless OpenPGP Protocol API for Java
// SPDX-FileCopyrightText: 2023 Paul Schaub
//
// SPDX-License-Identifier: Apache-2.0
package sop.operation
import java.io.IOException
import java.io.InputStream
import sop.exception.SOPGPException.BadData
interface DetachedVerify : AbstractVerify, VerifySignatures {
/**
* Provides the detached signatures.
*
* @param signatures input stream containing encoded, detached signatures.
* @return builder instance
* @throws BadData if the input stream does not contain OpenPGP signatures
* @throws IOException in case of an IO error
*/
@Throws(BadData::class, IOException::class)
fun signatures(signatures: InputStream): VerifySignatures
/**
* Provides the detached signatures.
*
* @param signatures byte array containing encoded, detached signatures.
* @return builder instance
* @throws BadData if the byte array does not contain OpenPGP signatures
* @throws IOException in case of an IO error
*/
@Throws(BadData::class, IOException::class)
fun signatures(signatures: ByteArray): VerifySignatures = signatures(signatures.inputStream())
}