All Downloads are FREE. Search and download functionalities are using the official Maven repository.

invirt.utils.hash.kt Maven / Gradle / Ivy

There is a newer version: 0.10.11
Show newest version
package invirt.utils

import java.security.MessageDigest

fun String.sha256(): String {
    val md = MessageDigest.getInstance("SHA-256")
    val digest = md.digest(toByteArray())
    return digest.fold("") { str, it -> str + "%02x".format(it) }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy