From 390687cccacebea82038e9ee0331f86f99eaab53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernd=20Pr=C3=BCnster?= Date: Tue, 31 Oct 2023 16:37:19 +0100 Subject: [PATCH] fix visibility --- .../kotlin/at/asitplus/crypto/datatypes/asn1/Asn1Reader.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datatypes/src/commonMain/kotlin/at/asitplus/crypto/datatypes/asn1/Asn1Reader.kt b/datatypes/src/commonMain/kotlin/at/asitplus/crypto/datatypes/asn1/Asn1Reader.kt index 29332193..9e624d7d 100644 --- a/datatypes/src/commonMain/kotlin/at/asitplus/crypto/datatypes/asn1/Asn1Reader.kt +++ b/datatypes/src/commonMain/kotlin/at/asitplus/crypto/datatypes/asn1/Asn1Reader.kt @@ -238,7 +238,7 @@ private fun Instant.Companion.decodeGeneralizedTimeFromDer(input: ByteArray): In * @throws Asn1Exception if the byte array is too long to be parsed to an int (note that only rudimentary checking happens) */ @Throws(Asn1Exception::class) -internal fun Int.Companion.decodeFromDer(input: ByteArray): Int = runRethrowing { +fun Int.Companion.decodeFromDer(input: ByteArray): Int = runRethrowing { if (input.size > 5) throw IllegalArgumentException("Absolute value too large!") return Long.decodeFromDer(input).toInt() } @@ -247,7 +247,7 @@ internal fun Int.Companion.decodeFromDer(input: ByteArray): Int = runRethrowing * @throws IllegalArgumentException if the byte array is too long to be parsed to a long (note that only rudimentary checking happens) */ @Throws(Asn1Exception::class) -internal fun Long.Companion.decodeFromDer(bytes: ByteArray): Long = runRethrowing { +fun Long.Companion.decodeFromDer(bytes: ByteArray): Long = runRethrowing { val input = if (bytes.size == 8) bytes else { if (bytes.size > 9) throw IllegalArgumentException("Absolute value too large!") val padding = if (bytes.first() and 0x80.toByte() != 0.toByte()) 0xFF.toByte() else 0x00.toByte()