1. DIego A Villegas R
  2. PowerBuilder
  3. Monday, 3 December 2018 17:09 PM UTC

Please i need help for consuming .jar from powerbuilder 2017 R 3  . The .jar , pbcrypto-1_0.jar , i am using EJB Client Proxy Wizard , i generating the ejb and the genera pbcripto_pbcrypto  object  then i use the code :

 

pbcripto_pbcrypto pbcrypto
pbcrypto = CREATE pbcripto_pbcrypto

TRY
  ls_clave_desencriptada= pbcrypto.decryptciphertextusingpbe("PBEWITHSHA1ANDDES", ll_salt, LL_ITERATION,            LS_CLAVE_SECRETA,as_clave_encriptada)
CATCH (Exception nsae) 
    MessageBox("Alert", nsae.getMessage()) 
     return '-1'
END TRY

 

 

thanks , i need help quickly for buy some licencies 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 3 December 2018 17:24 PM UTC
  2. PowerBuilder
  3. # 1

Hi Diego;

   Don't forget that you need to get the JavaVM running OK first ...

https://www.appeon.com/support/documents/appeon_online_help/pb2017r3/application_techniques/ch26s04.html

  Also, what error message code and text are you receiving?

HTH

Regards ... Chris

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 3 December 2018 17:33 PM UTC
  2. PowerBuilder
  3. # 2

Unless you are passing the encrypted data to a Java program, I would avoid it like the plague.

I have two free code samples that show how to use encryption using Win API functions.

This uses the newer BCrypt API:

http://www.topwizprogramming.com/freecode_bcrypt.html

This uses the older Crypto API:

http://www.topwizprogramming.com/freecode_cryptoapi.html

They both have similar functionality.

Comment
  1. Chris Pollach @Appeon
  2. Monday, 3 December 2018 18:51 PM UTC
Hi Roland;

Don't forget that encryption features are now *built into* PB2017R3 using the new "Crypterobject" object class. Along with data encoding via the "Coderobject" object class. ;-)

Regards ... Chris

  1. Helpful
  1. DIego A Villegas R
  2. Monday, 3 December 2018 21:34 PM UTC
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 3 December 2018 21:44 PM UTC
Hi Diego;

How about using the new SHA ( ) function and then pass that result of that operation to the new AsymmetricSign () function of the Crypterobject that supports DES?

Regards ... Chris
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 4 December 2018 00:58 AM UTC
  2. PowerBuilder
  3. # 3

If the .JAR is not a client-side library (was designed for server-side application, which most Java apps are) then the right way would be to deploy the .JAR to a Java app server and expose it to your PB app as a REST/JSON Web API.  PB 2017 has built-in support for calling and handling REST/JSON Web APIs both through its new HTTP client as well as REST/JSON support for DataWindows.  Chris demo'ed some of this stuff at Elevate 2018 conference: https://www.appeon.com/conference/elevate-2018/recordings.html

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.