This commit is contained in:
@@ -24,7 +24,7 @@ object SHA1 : HashFunction {
|
||||
0x8f1bbcdcU, 0xca62c1d6U,
|
||||
).asIntArray()
|
||||
|
||||
override fun hashInto(value: ByteArray, destination: ByteArray) {
|
||||
override fun hashInto(value: ByteArray, destination: ByteArray, destinationOffset: Int) {
|
||||
val input = pad(value)
|
||||
val h = initial.copyOf()
|
||||
val w = IntArray(80)
|
||||
@@ -33,7 +33,7 @@ object SHA1 : HashFunction {
|
||||
for (i in input.indices step block) {
|
||||
process(h, input, i, w, v)
|
||||
}
|
||||
h.copyInto(destination)
|
||||
h.copyInto(destination, destinationOffset)
|
||||
}
|
||||
|
||||
private fun pad(value: ByteArray): ByteArray {
|
||||
|
||||
Reference in New Issue
Block a user