Package com.identity4j.util.unix
Class SHACrypt
- java.lang.Object
-
- com.identity4j.util.unix.SHACrypt
-
public class SHACrypt extends Object
Porting from the C version of Flash Authoring flashfarm://depot/main/authortool/Utility/md5.cpp#4 The MD5 algorithm was not ported - using JDK version available since 1.3 Adapted to SHA hash by http://nervepoint.com- Author:
- cmurphy
-
-
Constructor Summary
Constructors Constructor Description SHACrypt()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringcrypt_sha(byte[] pw, String salt)static Stringcrypt_sha(byte[] pw, String salt, int size)static StringshaCrypt(String password, String charset, int size)static booleanverifySHAPassword(String plaintext, String ciphertext)
-
-
-
Method Detail
-
crypt_sha
public static String crypt_sha(byte[] pw, String salt) throws NoSuchAlgorithmException, UnsupportedEncodingException
-
crypt_sha
public static String crypt_sha(byte[] pw, String salt, int size) throws NoSuchAlgorithmException, UnsupportedEncodingException
-
verifySHAPassword
public static boolean verifySHAPassword(String plaintext, String ciphertext) throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
-
shaCrypt
public static String shaCrypt(String password, String charset, int size) throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
-
-