This commit is contained in:
@@ -36,7 +36,7 @@ class Blake2b(
|
||||
intArrayOf(10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0),
|
||||
)
|
||||
|
||||
override fun hashInto(value: ByteArray, destination: ByteArray) {
|
||||
override fun hashInto(value: ByteArray, destination: ByteArray, destinationOffset: Int) {
|
||||
val length = value.size.toULong()
|
||||
val input = pad(value)
|
||||
val h = initial.copyOf()
|
||||
@@ -49,7 +49,7 @@ class Blake2b(
|
||||
t += minOf(length - t, 128UL)
|
||||
compress(h, input, i, m, v, t, t < 1024UL)
|
||||
}
|
||||
h.toByteArray(LITTLE_ENDIAN).copyInto(destination, endIndex = bytes)
|
||||
h.toByteArray(LITTLE_ENDIAN).copyInto(destination, destinationOffset, endIndex = bytes)
|
||||
}
|
||||
|
||||
private fun pad(value: ByteArray): ByteArray {
|
||||
|
||||
Reference in New Issue
Block a user