1 Reply Latest reply on Jul 28, 2017 8:57 AM by polinao RSS
    ds-2 Apprentice

    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


      • Re: EncryptionWithKey throwing  Error
        polinao Collaborator

        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