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

sop.operation.VerifySignatures.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.Verification
import sop.exception.SOPGPException.BadData
import sop.exception.SOPGPException.NoSignature

interface VerifySignatures {

    /**
     * Provide the signed data (without signatures).
     *
     * @param data signed data
     * @return list of signature verifications
     * @throws IOException in case of an IO error
     * @throws NoSignature when no valid signature is found
     * @throws BadData when the data is invalid OpenPGP data
     */
    @Throws(IOException::class, NoSignature::class, BadData::class)
    fun data(data: InputStream): List

    /**
     * Provide the signed data (without signatures).
     *
     * @param data signed data
     * @return list of signature verifications
     * @throws IOException in case of an IO error
     * @throws NoSignature when no valid signature is found
     * @throws BadData when the data is invalid OpenPGP data
     */
    @Throws(IOException::class, NoSignature::class, BadData::class)
    fun data(data: ByteArray): List = data(data.inputStream())
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy