mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-02-16 19:52:03 +00:00
deprecate hmacSha256
This commit is contained in:
parent
d4c5e849bf
commit
905c7e8eda
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## 0.11.11
|
## 0.11.11
|
||||||
|
|
||||||
|
* `Crypto`:
|
||||||
|
* `hmacSha256` has been deprecated
|
||||||
* `Ktor`:
|
* `Ktor`:
|
||||||
* `Client`:
|
* `Client`:
|
||||||
* `BodyPair` has been deprecated
|
* `BodyPair` has been deprecated
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
package dev.inmo.micro_utils.crypto
|
package dev.inmo.micro_utils.crypto
|
||||||
|
|
||||||
|
@Deprecated("Deprecated due to incorrect of work sometimes and redundancy. Can be replaced by korlibs krypto")
|
||||||
expect fun SourceString.hmacSha256(key: String): String
|
expect fun SourceString.hmacSha256(key: String): String
|
||||||
|
@ -8,6 +8,7 @@ external interface CryptoJs {
|
|||||||
@JsNonModule
|
@JsNonModule
|
||||||
external val CryptoJS: CryptoJs
|
external val CryptoJS: CryptoJs
|
||||||
|
|
||||||
|
@Deprecated("Deprecated due to incorrect of work sometimes and redundancy. Can be replaced by korlibs krypto")
|
||||||
actual fun SourceString.hmacSha256(key: String): String {
|
actual fun SourceString.hmacSha256(key: String): String {
|
||||||
return CryptoJS.asDynamic().HmacSHA256(this, key).toString().unsafeCast<String>()
|
return CryptoJS.asDynamic().HmacSHA256(this, key).toString().unsafeCast<String>()
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package dev.inmo.micro_utils.crypto
|
|||||||
import javax.crypto.Mac
|
import javax.crypto.Mac
|
||||||
import javax.crypto.spec.SecretKeySpec
|
import javax.crypto.spec.SecretKeySpec
|
||||||
|
|
||||||
|
@Deprecated("Deprecated due to incorrect of work sometimes and redundancy. Can be replaced by korlibs krypto")
|
||||||
actual fun SourceString.hmacSha256(key: String): String {
|
actual fun SourceString.hmacSha256(key: String): String {
|
||||||
val mac = Mac.getInstance("HmacSHA256")
|
val mac = Mac.getInstance("HmacSHA256")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user