cancel
Showing results for 
Search instead for 
Did you mean: 

Decrypting MX_ENCRYPTED_PASSWORD

Former Member
0 Kudos

All,

I would really appreciate it if any of you could let me know how to decrypt the MX_ENCRYPTED_PASSWORD. I'm trying to set the password of a newly created account to the existing IC password. I created a javascript function as follows:

function sap_decryptPassword(Par){
	var pwd = UserFunc.uDESDecrypt("", Par);
	return pwd;
}

The argument is getting the encrypted password. However, the method returns null.

Thanks,

Biju.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I have found that this works only when using the WINDOWS and not the JAVA (default) engine.

Cheers,

Matt

Former Member
0 Kudos

Thanks, Matt. That is a good information. Do you think it's a product bug ?

Would it be possible to set a variable in the task to use windows engine to decrypt and proceed with rest of the task by using java engine?

Former Member
0 Kudos

No, there can only be one engine per pass, but workflows can use a combination of tasks that use WINDOWS and JAVA engines.

Cheers,

Matt

Answers (3)

Answers (3)

Frank_Buchholz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Biju,

Using the SAP Provisioning Framework (Java runtime) you would use these functions to encrypt / decrypt the password:

encrypt:

MX_ENCRYPTED_PASSWORD $FUNCTION.sap_encryptPassword(%MX_LASTNAME%)$$

decrypt:

password $FUNCTION.sap_getPassword(%MX_ENCRYPTED_PASSWORD%)$$

sap_getPassword calls

password = UserFunc.uDESDecrypt("", Par);

as in your example.

-> It seems to be a configuration issue with your key.ini file or with the JCE.

The online help (search for 3DES) states the following:

Note: The Java components, the runtime engine and import/export, require the Java Cryptography Extension (JCE) 1.2.2 for triple DES encryption. This can be downloaded from http://java.sun.com/products/jce/index-122.html.

Kind regards

Frank

Former Member
0 Kudos

Hi Frank,

I've noticed that note on DES3 in the help pages. However, JCE 1.2.2 has reached it's end of life. Also, JCE is part of standard java since Java 1.4.

So I'm not sure if we really need 1.2.2 to be installed. Also it doesn't say the JCE should be installed on the server or the IC. (I tried installing JCE 1.2.2 in the IC on my laptop without any luck - still not able to decrypt the password) .

If you can give me some pointers, that would be of great help.

Thanks,

Biju.

Former Member
0 Kudos

I just noticed that if I encrypt a string and pass the encrypted value to this function, it decrypts correctly. It doesn't decrypt the MX_ENCRYPTED_VALUE even if it has value that starts with .

Is it because the password is encrypted with different key? If yes how can I decrypt the password?

Thanks in advance.

Former Member
0 Kudos

Hope you would get information from below tags

regards

nag