Java ile string verinin SHA256 HASH dönüşümü için ki bu tekniği android de de kullanabilirsiniz.
import java.security.MessageDigest; import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException;
public static String sha256(String base) { try { MessageDigest digest = MessageDigest.getInstance("SHA-256"); byte[] hash = digest.digest(base.getBytes("UTF-8")); StringBuilder hexString = new StringBuilder();
for (int hi = 0; hi < hash.length; hi++) { String hex = Integer.toHexString(0xff & hash[hi]); if (hex.length() == 1) { hexString.append('0'); } hexString.append(hex); }
return hexString.toString(); } catch (NoSuchAlgorithmException | UnsupportedEncodingException ex) { throw new RuntimeException(ex); } }
Keywords: java string to sha256 converter, android string to sha256 converter
------------- http://www.kasatakip.com - Kasa Takip | http://www.caritakip.com - Cari Takip | http://www.evraktakip.com - Evrak Takip | http://www.etasqlmobil.com - ETA SQL Mobil
|