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 package sop.operation
import java.io.IOException
import java.io.InputStream
import sop.Ready import sop.Ready
import sop.exception.SOPGPException import sop.exception.SOPGPException
import sop.util.UTF8Util import sop.util.UTF8Util
import java.io.IOException
import java.io.InputStream
interface CertifyUserId { interface CertifyUserId {
@Throws(SOPGPException.UnsupportedOption::class) @Throws(SOPGPException.UnsupportedOption::class) fun noArmor(): CertifyUserId
fun noArmor(): CertifyUserId
@Throws(SOPGPException.UnsupportedOption::class) @Throws(SOPGPException.UnsupportedOption::class) fun userId(userId: String): CertifyUserId
fun userId(userId: String): CertifyUserId
@Throws(SOPGPException.PasswordNotHumanReadable::class, SOPGPException.UnsupportedOption::class) @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) @Throws(SOPGPException.PasswordNotHumanReadable::class, SOPGPException.UnsupportedOption::class)
fun withKeyPassword(password: ByteArray): CertifyUserId fun withKeyPassword(password: ByteArray): CertifyUserId
@Throws(SOPGPException.UnsupportedOption::class) @Throws(SOPGPException.UnsupportedOption::class) fun noRequireSelfSig(): CertifyUserId
fun noRequireSelfSig(): CertifyUserId
@Throws(SOPGPException.BadData::class, IOException::class, SOPGPException.KeyIsProtected::class) @Throws(SOPGPException.BadData::class, IOException::class, SOPGPException.KeyIsProtected::class)
fun keys(keys: InputStream): CertifyUserId fun keys(keys: InputStream): CertifyUserId
@ -33,9 +31,11 @@ interface CertifyUserId {
@Throws(SOPGPException.BadData::class, IOException::class, SOPGPException.KeyIsProtected::class) @Throws(SOPGPException.BadData::class, IOException::class, SOPGPException.KeyIsProtected::class)
fun keys(keys: ByteArray): CertifyUserId = keys(keys.inputStream()) 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 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()) fun certs(certs: ByteArray): Ready = certs(certs.inputStream())
} }

View file

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

View file

@ -4,11 +4,11 @@
package sop.operation package sop.operation
import java.io.IOException
import java.io.InputStream
import sop.Ready import sop.Ready
import sop.exception.SOPGPException import sop.exception.SOPGPException
import sop.util.UTF8Util import sop.util.UTF8Util
import java.io.IOException
import java.io.InputStream
interface UpdateKey { interface UpdateKey {
@ -24,20 +24,31 @@ interface UpdateKey {
@Throws(SOPGPException.UnsupportedOption::class) fun noNewMechanisms(): UpdateKey @Throws(SOPGPException.UnsupportedOption::class) fun noNewMechanisms(): UpdateKey
@Throws(SOPGPException.PasswordNotHumanReadable::class, SOPGPException.UnsupportedOption::class) @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) @Throws(SOPGPException.PasswordNotHumanReadable::class, SOPGPException.UnsupportedOption::class)
fun withKeyPassword(password: ByteArray): UpdateKey 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 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()) 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 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()) fun key(key: ByteArray): Ready = key(key.inputStream())
} }