@Test public void testEncryptSHAString() throws Exception { Assert.assertEquals("", SHA.encryptSHA((String) null)); Assert.assertEquals(SHA_foo, SHA.encryptSHA("foo")); Assert.assertEquals(SHA_bar, SHA.encryptSHA("bar")); }
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);  }