use asByteArray _view_ where possible (optimization)
This commit is contained in:
1 parent
b5ac0c4e7e
commit
6431d4896a
17 files changed
+50
-22
No files matched your search
@@ -12,7 +12,7 @@ fun ByteArray.digestKeccak(parameter: KeccakParameter): ByteArray {
|
||||
}
|
||||
|
||||
fun UByteArray.digestKeccak(parameter: KeccakParameter): UByteArray {
|
||||
return Keccak.digest(this.toByteArray(), parameter).toUByteArray()
|
||||
return Keccak.digest(this.asByteArray(), parameter).toUByteArray()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user