refactor padding

This commit is contained in:
2026-01-22 12:44:59 +01:00
parent 5547e77c58
commit e138ec0b6d
11 changed files with 53 additions and 53 deletions

View File

@@ -54,9 +54,9 @@ class Blake2b(
private fun pad(value: ByteArray): ByteArray {
val size = maxOf(value.size.align(block), block)
val result = ByteArray(size)
value.copyInto(result)
return result
return ByteArray(size).also {
value.copyInto(it)
}
}
private fun compress(