Checkstyle

This commit is contained in:
Paul Schaub 2024-09-19 16:56:43 +02:00
parent 0ec2961cbe
commit 2ec7088c12
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
3 changed files with 35 additions and 25 deletions

View file

@ -4,28 +4,26 @@
package sop.operation
import java.io.IOException
import java.io.InputStream
import sop.Ready
import sop.exception.SOPGPException
import sop.util.UTF8Util
import java.io.IOException
import java.io.InputStream
interface CertifyUserId {
@Throws(SOPGPException.UnsupportedOption::class)
fun noArmor(): CertifyUserId
@Throws(SOPGPException.UnsupportedOption::class) fun noArmor(): CertifyUserId
@Throws(SOPGPException.UnsupportedOption::class)
fun userId(userId: String): CertifyUserId
@Throws(SOPGPException.UnsupportedOption::class) fun userId(userId: String): CertifyUserId
@Throws(SOPGPException.PasswordNotHumanReadable::class, SOPGPException.UnsupportedOption::class)
fun withKeyPassword(password: String): CertifyUserId = withKeyPassword(password.toByteArray(UTF8Util.UTF8))
fun withKeyPassword(password: String): CertifyUserId =
withKeyPassword(password.toByteArray(UTF8Util.UTF8))
@Throws(SOPGPException.PasswordNotHumanReadable::class, SOPGPException.UnsupportedOption::class)
fun withKeyPassword(password: ByteArray): CertifyUserId
@Throws(SOPGPException.UnsupportedOption::class)
fun noRequireSelfSig(): CertifyUserId
@Throws(SOPGPException.UnsupportedOption::class) fun noRequireSelfSig(): CertifyUserId
@Throws(SOPGPException.BadData::class, IOException::class, SOPGPException.KeyIsProtected::class)
fun keys(keys: InputStream): CertifyUserId
@ -33,9 +31,11 @@ interface CertifyUserId {
@Throws(SOPGPException.BadData::class, IOException::class, SOPGPException.KeyIsProtected::class)
fun keys(keys: ByteArray): CertifyUserId = keys(keys.inputStream())
@Throws(SOPGPException.BadData::class, IOException::class, SOPGPException.CertUserIdNoMatch::class)
@Throws(
SOPGPException.BadData::class, IOException::class, SOPGPException.CertUserIdNoMatch::class)
fun certs(certs: InputStream): Ready
@Throws(SOPGPException.BadData::class, IOException::class, SOPGPException.CertUserIdNoMatch::class)
@Throws(
SOPGPException.BadData::class, IOException::class, SOPGPException.CertUserIdNoMatch::class)
fun certs(certs: ByteArray): Ready = certs(certs.inputStream())
}

View file

@ -4,15 +4,14 @@
package sop.operation
import sop.Ready
import sop.exception.SOPGPException
import java.io.IOException
import java.io.InputStream
import sop.Ready
import sop.exception.SOPGPException
interface MergeCerts {
@Throws(SOPGPException.UnsupportedOption::class)
fun noArmor(): MergeCerts
@Throws(SOPGPException.UnsupportedOption::class) fun noArmor(): MergeCerts
@Throws(SOPGPException.BadData::class, IOException::class)
fun updates(updateCerts: InputStream): MergeCerts

View file

@ -4,11 +4,11 @@
package sop.operation
import java.io.IOException
import java.io.InputStream
import sop.Ready
import sop.exception.SOPGPException
import sop.util.UTF8Util
import java.io.IOException
import java.io.InputStream
interface UpdateKey {
@ -24,20 +24,31 @@ interface UpdateKey {
@Throws(SOPGPException.UnsupportedOption::class) fun noNewMechanisms(): UpdateKey
@Throws(SOPGPException.PasswordNotHumanReadable::class, SOPGPException.UnsupportedOption::class)
fun withKeyPassword(password: String): UpdateKey = withKeyPassword(password.toByteArray(UTF8Util.UTF8))
fun withKeyPassword(password: String): UpdateKey =
withKeyPassword(password.toByteArray(UTF8Util.UTF8))
@Throws(SOPGPException.PasswordNotHumanReadable::class, SOPGPException.UnsupportedOption::class)
fun withKeyPassword(password: ByteArray): UpdateKey
@Throws(SOPGPException.UnsupportedOption::class, SOPGPException.BadData::class, IOException::class)
@Throws(
SOPGPException.UnsupportedOption::class, SOPGPException.BadData::class, IOException::class)
fun mergeCerts(certs: InputStream): UpdateKey
@Throws(SOPGPException.UnsupportedOption::class, SOPGPException.BadData::class, IOException::class)
@Throws(
SOPGPException.UnsupportedOption::class, SOPGPException.BadData::class, IOException::class)
fun mergeCerts(certs: ByteArray): UpdateKey = mergeCerts(certs.inputStream())
@Throws(SOPGPException.BadData::class, IOException::class, SOPGPException.KeyIsProtected::class, SOPGPException.PrimaryKeyBad::class)
@Throws(
SOPGPException.BadData::class,
IOException::class,
SOPGPException.KeyIsProtected::class,
SOPGPException.PrimaryKeyBad::class)
fun key(key: InputStream): Ready
@Throws(SOPGPException.BadData::class, IOException::class, SOPGPException.KeyIsProtected::class, SOPGPException.PrimaryKeyBad::class)
@Throws(
SOPGPException.BadData::class,
IOException::class,
SOPGPException.KeyIsProtected::class,
SOPGPException.PrimaryKeyBad::class)
fun key(key: ByteArray): Ready = key(key.inputStream())
}