Complete the method fun hashPassword(password: String): String to return the SHA-256 hash for the password parameter.
Hashing and security
Hashing a password in Kotlin
Report a typo
Sample Input 1:
SecretSample Output 1:
7e32a729b1226ed1270f282a8c63054d09b26bc9ec53ea69771ce38158dfade8Write a program in Kotlin
import java.security.MessageDigest
fun hashPassword(password: String): String {
// write your code here
}
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.