mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2024-12-01 19:42:08 +01:00
Checkstyle
This commit is contained in:
parent
0ec2961cbe
commit
2ec7088c12
3 changed files with 35 additions and 25 deletions
|
@ -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())
|
||||||
}
|
}
|
|
@ -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
|
||||||
|
|
|
@ -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())
|
||||||
}
|
}
|
Loading…
Reference in a new issue