From fa625a82583247893decaf351789a7f84ccb76a8 Mon Sep 17 00:00:00 2001 From: Denis Trotsenko Date: Sun, 21 Jan 2024 19:11:16 +0100 Subject: [PATCH] Don't expose unnecessary extension methods --- .../kotlin/app/keemobile/kotpass/extensions/ByteArray.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kotpass/src/main/kotlin/app/keemobile/kotpass/extensions/ByteArray.kt b/kotpass/src/main/kotlin/app/keemobile/kotpass/extensions/ByteArray.kt index 54260df..4cf56fc 100644 --- a/kotpass/src/main/kotlin/app/keemobile/kotpass/extensions/ByteArray.kt +++ b/kotpass/src/main/kotlin/app/keemobile/kotpass/extensions/ByteArray.kt @@ -7,19 +7,19 @@ import kotlin.experimental.xor private const val Sha256 = "SHA-256" private const val Sha512 = "SHA-512" -fun ByteArray.sha256(): ByteArray = MessageDigest +internal fun ByteArray.sha256(): ByteArray = MessageDigest .getInstance(Sha256) .digest(this) -fun ByteArray.sha512(): ByteArray = MessageDigest +internal fun ByteArray.sha512(): ByteArray = MessageDigest .getInstance(Sha512) .digest(this) -fun ByteArray.clear() { +internal fun ByteArray.clear() { for (i in indices) this[i] = 0x0 } -fun ByteArray.constantTimeEquals(other: ByteArray): Boolean { +internal fun ByteArray.constantTimeEquals(other: ByteArray): Boolean { if (this === other) { return true }