/**
* SHA-256 으로 암호화된 passwd 를 반환.
* @param str
* @return hashed string.
*/
public static String makeSHApasswd(String str){
int interNb = 1000;
byte[] byteArray =byteArrFromStr("osungbnk");
StringBuilder x = new StringBuilder();
try {
if(!"".equalsIgnoreCase(str)){ //
byte[] retVal = getHash(interNb, str, byteArray);
for(int i=0; i<retVal.length; i++){
x.append(String.format("%x", retVal[i]));
}
}
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e1) {
e1.printStackTrace();
}
return x.toString();
}