cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble with uDecrypt

former_member2987
Active Contributor
0 Kudos

Hey guys, I need another set of eyes (or something)

I'm having some issues with the uDecrypt function from the Identity Store MX_ENCRYPTED_PASSWORD attribute.  When I try to decrypt it (sending a notification to a manager that the new account and password that was requested is now available.

When I test the task, I get:

Error Exception initializing Triple DES:mjava.lang.Throwable: Non hex character found: '.' (-1) at offset 32

Warning User: 9BW00041 has been created!

Warning Encrypted: {DES3CBC}1:4a0681d708743198-22a1df873bbc71777fc66efae663863e.

Warning Password: null.

So you see, I am passing what appears to be a valid encrypted password.

Here's the script I'm using.  As you will see it's a place holder for the eventual email notificaition:

// Main function: zPlaceholder

function zPlaceholder(Par){

    var pwd = Par.get ("MX_ENCRYPTED_PASSWORD");

    var password = uDecrypt(pwd);

    uWarning ("     User: " + Par.get ("MSKEYVALUE") + " has been created!");

    uWarning ("Encrypted: " + pwd);

    uWarning (" Password: " + password + ".");

    uWarning ("This is not a notification  =)");

}

It's just not that complicated, which is what's driving me batty.

Now just for grins, I created this script, which I ran in a job and it works PERFECTLY! (Again making me wonder about my sanity)

// Main function: test

function test(Par){

    var test = "this is a test"

    var encr = uEncrypt(test);

    var decr = uDecrypt(encr);

    uWarning ("test: " + test);

    uWarning ("encr: " + encr);

    uWarning ("decr: " + decr);

}

Both are running in "To Generic" passes.  I'm using 7.2 SP9 P1, and the encryption option is set to DES/CBC.

Thanks!

Matt

Accepted Solutions (1)

Accepted Solutions (1)

former_member2987
Active Contributor
0 Kudos

Ok, it's not working on my sandbox either.  What gives???? Any of you have an idea about this?

Thanks,

Matt

Former Member
0 Kudos

Hi Matt/Tero

The only strange thing I see without testing myself is that your encrypted password seems to have a period at the end (if the script you are showing is accurate).

This seems a bit strange. Try your job with the same string as the password and see if you get the same encryption.

Ole K.

former_member2987
Active Contributor
0 Kudos

I will take a look!

former_member2987
Active Contributor
0 Kudos

Ole,

You get the Eagle Eye award!  That was it.  Not sure how it got there, but everything is fine now.

Thanks for saving my sanity!  

Matt

(PS -Steffi, I gave you a helpful since you did find it as well, but Ole was first!)

Answers (2)

Answers (2)

Steffi_Warnecke
Active Contributor
0 Kudos

Hmm, just throwing that in there:

{DES3CBC}1:4a0681d708743198-22a1df873bbc71777fc66efae663863e.

Is the warning talking about the dot at the end of it?

Regards,

Steffi.

EDIT: Yeah, what Ole said. ^^

terovirta
Active Contributor
0 Kudos

Where does the encrypted password originate from? Was in encrypted with the same keys.ini as you're trying to decrypt?

The only hard time I've ever had was when keys.ini -files didn't match..

regards, Tero

former_member2987
Active Contributor
0 Kudos

I thought of that. However IDM and NetWeaver are on the same machine.

Maybe NetWeaver is pointing to a different KEYS.INI or maybe none at all?

Let me check!

former_member2987
Active Contributor
0 Kudos

Nope, they're pointed to the same one.  I'm wondering if I should just wipe Keys.ini and generate a new one.  It's DEV and there's no one really in it.

terovirta
Active Contributor
0 Kudos

Maybe that or just regenerate passwords (as your decrypt/encrypt script worked)..

Is it "your" system, so nobody else had their hands on it when the password where generated originally and could have changed the keys.ini?

Odd one for sure..

regards, Tero

former_member2987
Active Contributor
0 Kudos

Hi Tero,

I inhereited the system from another consultant, who is no longer available.

I think I'm going to take the task and test it on my personal sandbox and see what happens there.

I'll keep you posted...

Matt