cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

EncryptionWithKey throwing Error

ds-21
1-Newbie

EncryptionWithKey throwing Error

hi,

  i am facing the Invalid Hex String length while executing  EncryptWithKey service.

var key = "327235753778214125442A472D4B6150645367566B59703373367639792F423F4528482B4D6251655468576D5A7134743777217A25432646294A404E63526655";

var params = {

  data: password /* STRING */,

  key: key /* STRING */

};

// result: STRING

var result = Resources["EncryptionServices"].EncryptWithKey(params);





output


2 REPLIES 2
posipova
20-Turquoise
(To:ds-21)

There is a Jira for improvement of this functionality, PSPT-3136.

Currently, details on our encryption:

  • Algorithm used is based on SunJCE, AES/CBC/PKCS5Padding, 128 bit
  • Key size must be specified in 56 bytes via a hex string
  • IV will always be the first 16 bytes of the key specified for encryption / decryption
PGayathri
5-Regular Member
(To:posipova)

Hi Polina,
I am also getting the same error. Any update on the above issue. if yes can you please provide me the solution.

 

Thanks you.

Top Tags