All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sop.operation.DetachedVerify.kt Maven / Gradle / Ivy

There is a newer version: 10.0.3
Show newest version
// 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())
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy