summaryrefslogtreecommitdiff
path: root/plugin/src/main/kotlin/moe/nea/archenemy/util/DigestUtils.kt
blob: 4f50000f38d09d4fe3b138514d311ff44d04ff73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package moe.nea.archenemy.util

import java.security.MessageDigest

fun MessageDigest.updateField(text: String, value: String) {
    this.update(text)
    this.update(":")
    this.update(value)
    this.update(";")
}

fun MessageDigest.update(text: String) {
    this.update(text.encodeToByteArray())
}