This commit is contained in:
@@ -43,7 +43,7 @@ object `SHA-512` : HashFunction {
|
||||
0x4cc5d4becb3e42b6UL, 0x597f299cfc657e2aUL, 0x5fcb6fab3ad6faecUL, 0x6c44198c4a475817UL,
|
||||
).asLongArray()
|
||||
|
||||
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 = LongArray(80)
|
||||
@@ -52,7 +52,7 @@ object `SHA-512` : HashFunction {
|
||||
for (i in input.indices step block) {
|
||||
process(h, input, i, w, v)
|
||||
}
|
||||
h.copyInto(destination)
|
||||
h.copyInto(destination, destinationOffset)
|
||||
}
|
||||
|
||||
internal fun pad(value: ByteArray): ByteArray {
|
||||
|
||||
Reference in New Issue
Block a user