Skip to main content
1-Visitor
July 28, 2017
Question

EncryptionWithKey throwing Error

  • July 28, 2017
  • 1 reply
  • 2325 views

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


1 reply

20-Turquoise
July 28, 2017

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
1-Visitor
March 23, 2018

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.