This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
public class CryptoOne { | |
public static String getHash(String word, int x) throws NoSuchAlgorithmException { | |
String oldWord = word; | |
String newWord = null; | |
MessageDigest digest = MessageDigest.getInstance("SHA-256"); | |
for (int i = 0; i < x; i++) { | |
if (newWord != null) { |