1. Ganesan Rajan
  2. PowerBuilder
  3. Thursday, 16 February 2023 09:34 AM UTC


Our application is based on PB2019R.

To login to our application, the user has to enter a password. Currently we are using own way of encrypting password and storing it in table.

BUT, we have been asked to use "Salt and Hash" to encrypt our application password.

Is there anyway can we achieve this in PowerBuilder?

Your help will be much appreciated.


Ganesan R

Accepted Answer
mike S Accepted Answer Pending Moderation
  1. Thursday, 16 February 2023 14:47 PM UTC
  2. PowerBuilder
  3. # Permalink

salt just means to add some values to the password, each user has their own salt values.  

 you need to decide the hash size:

SHA256! – SHA256

SHA384! – SHA384

SHA512! – SHA512

SHA3_224! – SHA3-224

SHA3_256! – SHA3-256

SHA3_384! – SHA3-384

SHA3_512! – SHA3-512


your code will look something like this

lcr_crypt = Create CrypterObject
lcdr_coder = Create CoderObject



lblob_password = blob( password_salted , EncodingUTF8! ) //salted password
lblb_hash = lcr_crypt.sha( SHA3_256! , lblob_password )
ls_hash = lcdr_coder.base64encode( lblb_hash )

There are no comments made yet.
Ganesan Rajan Accepted Answer Pending Moderation
  1. Friday, 17 February 2023 10:08 AM UTC
  2. PowerBuilder
  3. # 1

Thanks. We shall try this and get back If needed.


Ganesan R

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.