From a947271c3c374b17f6be1ff204a2e38f1d2853c8 Mon Sep 17 00:00:00 2001 From: sergeych Date: Sun, 25 Aug 2024 02:31:33 +0200 Subject: [PATCH] deprecations --- .../org/komputing/khash/keccak/extensions/PublicExtensions.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/commonMain/kotlin/org/komputing/khash/keccak/extensions/PublicExtensions.kt b/src/commonMain/kotlin/org/komputing/khash/keccak/extensions/PublicExtensions.kt index 05acc04..d408301 100644 --- a/src/commonMain/kotlin/org/komputing/khash/keccak/extensions/PublicExtensions.kt +++ b/src/commonMain/kotlin/org/komputing/khash/keccak/extensions/PublicExtensions.kt @@ -7,10 +7,12 @@ import org.komputing.khash.keccak.KeccakParameter /** * Computes the proper Keccak digest of [this] byte array based on the given [parameter] */ +@Deprecated("will be removed, use Hash", ReplaceWith("Hash")) fun ByteArray.digestKeccak(parameter: KeccakParameter): ByteArray { return Keccak.digest(this, parameter) } +@Deprecated("will be removed, use Hash", ReplaceWith("Hash")) fun UByteArray.digestKeccak(parameter: KeccakParameter): UByteArray { return Keccak.digest(this.asByteArray(), parameter).toUByteArray() } @@ -18,6 +20,7 @@ fun UByteArray.digestKeccak(parameter: KeccakParameter): UByteArray { /** * Computes the proper Keccak digest of [this] string based on the given [parameter] */ +@Deprecated("will be removed, use Hash", ReplaceWith("Hash")) fun String.digestKeccak(parameter: KeccakParameter): ByteArray { return Keccak.digest(encodeToByteArray(), parameter) }