@Test public void testEncryptSHA() throws Exception { final byte[] data = {112, 55, -128, 113, -104, -62, 42, 125, 43, 8, 7, 55, 29, 118, 55, 121, -88, 79, -33, -49}; Assert.assertArrayEquals(data, SHA.encryptSHA(new byte[]{1, 2, 3})); }
public static byte[] encryptSHA(byte[] data) throws Exception { MessageDigest sha = MessageDigest.getInstance(KEY_SHA1); sha.update(data); return sha.digest(); }
SHA { public static byte[] encryptSHA(byte[] data) throws Exception { MessageDigest sha = MessageDigest.getInstance(KEY_SHA1); sha.update(data); return sha.digest(); } }
SHA { public static byte[] encryptSHA(byte[] data) throws Exception { MessageDigest sha = MessageDigest.getInstance(KEY_SHA1); sha.update(data); return sha.digest(); } SHA(); }
SHA { public static byte[] encryptSHA(byte[] data) throws Exception { MessageDigest sha = MessageDigest.getInstance(KEY_SHA1); sha.update(data); return sha.digest(); } SHA(); static byte[] encryptSHA(byte[] data); static String encryptSHA(String data); static String encryptSHA(String str,String ecryptCode); static void main(String[] args); }
SHA { public static byte[] encryptSHA(byte[] data) throws Exception { MessageDigest sha = MessageDigest.getInstance(KEY_SHA1); sha.update(data); return sha.digest(); } SHA(); static byte[] encryptSHA(byte[] data); static String encryptSHA(String data); static String encryptSHA(String str,String ecryptCode); static void main(String[] args);  }