This commit is contained in:
@@ -49,7 +49,7 @@ object MD5 : HashFunction {
|
||||
6, 10, 15, 21, 6, 10, 15, 21,
|
||||
)
|
||||
|
||||
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(16)
|
||||
@@ -58,7 +58,7 @@ object MD5 : HashFunction {
|
||||
for (i in input.indices step block) {
|
||||
process(h, input, i, w, v)
|
||||
}
|
||||
h.copyInto(destination, order = LITTLE_ENDIAN)
|
||||
h.copyInto(destination, destinationOffset, order = LITTLE_ENDIAN)
|
||||
}
|
||||
|
||||
private fun pad(value: ByteArray): ByteArray {
|
||||
|
||||
Reference in New Issue
Block a user