Android SHA1 Hash Create SHA256(String text)

Here you can find the source of SHA256(String text)

Description

SHA

License

Apache License

Declaration

public static byte[] SHA256(String text)
            throws NoSuchAlgorithmException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class Main {
    public static byte[] SHA256(String text)
            throws NoSuchAlgorithmException {
        MessageDigest md = MessageDigest.getInstance("SHA-256");

        md.update(text.getBytes());/* w  w w  .ja v  a  2  s.co m*/

        return md.digest();
    }
}

Related

  1. sha512(String what_to_encode)
  2. SHA1(String text)
  3. dataDigest(String in)
  4. SHA1(String s)
  5. SHA1(String text)
  6. HashPassword(String text)
  7. sha1(File input)
  8. sha1(String input)
  9. sha1(String ori)