This commit is contained in:
@@ -31,7 +31,7 @@ object `SHA-256` : HashFunction {
|
||||
0x748f82eeU, 0x78a5636fU, 0x84c87814U, 0x8cc70208U, 0x90befffaU, 0xa4506cebU, 0xbef9a3f7U, 0xc67178f2U,
|
||||
).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(64)
|
||||
@@ -40,7 +40,7 @@ object `SHA-256` : 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