Skip to content

Commit 928b5c9

Browse files
authored
Add SignatureException (#12)
1 parent ae53f17 commit 928b5c9

File tree

4 files changed

+66
-0
lines changed

4 files changed

+66
-0
lines changed

library/error/api/error.klib.api

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,12 @@ open class org.kotlincrypto.error/ShortBufferException : org.kotlincrypto.error/
6868
constructor <init>(kotlin/String?) // org.kotlincrypto.error/ShortBufferException.<init>|<init>(kotlin.String?){}[0]
6969
}
7070

71+
open class org.kotlincrypto.error/SignatureException : org.kotlincrypto.error/GeneralSecurityException { // org.kotlincrypto.error/SignatureException|null[0]
72+
constructor <init>() // org.kotlincrypto.error/SignatureException.<init>|<init>(){}[0]
73+
constructor <init>(kotlin/String?) // org.kotlincrypto.error/SignatureException.<init>|<init>(kotlin.String?){}[0]
74+
constructor <init>(kotlin/String?, kotlin/Throwable?) // org.kotlincrypto.error/SignatureException.<init>|<init>(kotlin.String?;kotlin.Throwable?){}[0]
75+
constructor <init>(kotlin/Throwable?) // org.kotlincrypto.error/SignatureException.<init>|<init>(kotlin.Throwable?){}[0]
76+
}
77+
7178
final inline fun org.kotlincrypto.error/requireParam(kotlin/Boolean) // org.kotlincrypto.error/requireParam|requireParam(kotlin.Boolean){}[0]
7279
final inline fun org.kotlincrypto.error/requireParam(kotlin/Boolean, kotlin/Function0<kotlin/Any>) // org.kotlincrypto.error/requireParam|requireParam(kotlin.Boolean;kotlin.Function0<kotlin.Any>){}[0]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2025 KotlinCrypto
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
**/
16+
@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
17+
18+
package org.kotlincrypto.error
19+
20+
/**
21+
* The `SignatureException` class is a generic security exception class that provides type safety
22+
* for all the signature-related exception classes that extend from it.
23+
* */
24+
public expect open class SignatureException: GeneralSecurityException {
25+
public constructor()
26+
public constructor(message: String?)
27+
public constructor(message: String?, cause: Throwable?)
28+
public constructor(cause: Throwable?)
29+
}

library/error/src/jvmMain/kotlin/org/kotlincrypto/error/JvmExceptions.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ public actual typealias IllegalBlockSizeException = javax.crypto.IllegalBlockSiz
2727
public actual typealias KeyException = java.security.KeyException
2828
public actual typealias InvalidKeyException = java.security.InvalidKeyException
2929
public actual typealias ShortBufferException = javax.crypto.ShortBufferException
30+
public actual typealias SignatureException = java.security.SignatureException
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2025 KotlinCrypto
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
**/
16+
@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
17+
18+
package org.kotlincrypto.error
19+
20+
/**
21+
* The `SignatureException` class is a generic security exception class that provides type safety
22+
* for all the signature-related exception classes that extend from it.
23+
* */
24+
public actual open class SignatureException: GeneralSecurityException {
25+
public actual constructor(): super()
26+
public actual constructor(message: String?): super(message)
27+
public actual constructor(message: String?, cause: Throwable?): super(message, cause)
28+
public actual constructor(cause: Throwable?): super(cause)
29+
}

0 commit comments

Comments
 (0)