Showing posts with label R12.1.1 Decrypt Oracle Apps Password. Show all posts
Showing posts with label R12.1.1 Decrypt Oracle Apps Password. Show all posts

Monday, 9 May 2011

R12.1.1 Decrypt Oracle Apps Password (back end)


R12.1.1 Decrypt Oracle Apps Password


Here's the code to decrypt the oracle apps password in R12.1.1 (note, it's different to 11i).
CREATE OR REPLACE PACKAGE get_pwd
AS
FUNCTION decrypt (
KEY IN VARCHAR2
,VALUE IN VARCHAR2
)
RETURN VARCHAR2;
END get_pwd;
/
CREATE OR REPLACE PACKAGE BODY get_pwd AS
FUNCTION decrypt (
KEY IN VARCHAR2
,VALUE IN VARCHAR2
)
RETURN VARCHAR2
AS
LANGUAGE JAVA
NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt
(java.lang.String,java.lang.String) return java.lang.String';
END get_pwd;
/
SELECT (SELECT get_pwd.decrypt(FND_WEB_SEC.GET_GUEST_USERNAME_PWD, 
usertable.encrypted_foundation_password)FROM DUAL) AS apps_password
FROM fnd_user usertable
WHERE usertable.user_name = (SELECT substr(FND_WEB_SEC.GET_GUEST_USERNAME_PWD,
1,instr(FND_WEB_SEC.GET_GUEST_USERNAME_PWD,'/')-1) from dual)