2011-11-16 6 views

답변

5

"jaas is the way"는 이전 jboss 버전 (4.x)의 경우 기본 키입니다. 당신은 인코딩 된 바이트를 디코딩하기 위해 이와 같은 것을 시도 할 수 있습니다.

public static String decode(String secret) { 
    String retString = ""; 
    try { 
     byte[] kbytes = "jaas is the way".getBytes(); 
     SecretKeySpec key = new SecretKeySpec(kbytes, "Blowfish"); 

     BigInteger n = new BigInteger(secret, 16); 
     byte[] encoding = n.toByteArray(); 

     Cipher cipher = Cipher.getInstance("Blowfish"); 
     cipher.init(Cipher.DECRYPT_MODE, key); 
     byte[] decode = cipher.doFinal(encoding); 
     retString = new String(decode); 
    } catch (Exception ignore) { 
     ignore.printStackTrace(); 
    } 

    return retString; 
} 

몇 가지 추가 정보를 원하시면

https://docs.jboss.org/jbossas/javadoc/4.0.2/org/jboss/resource/security/SecureIdentityLoginModule.java.html

http://www.docjar.com/html/api/org/jboss/resource/security/SecureIdentityLoginModule.java.html

관련 문제