1. Thomas Rolseth
  2. PowerServer 2020 or older (Obsolete)
  3. Monday, 29 April 2019 16:21 PM UTC

The new native CrypterObject is not supported in PowerServer web.  To get around this I've been trying to utilize the bcyrpt and crypt32 dll's in windows with no success however.  They always return a null value when I run the app in the web environment (they work fine when the app is run in the standard way).  It seems like someone must have dealt with this.  Any suggestions?  Maybe there is a deployment/configuration step I am missing?  I'd like to use the AES algorithm with 128 bit encryption if possible.

mike S Accepted Answer Pending Moderation
  1. Monday, 29 April 2019 18:47 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

I've used HMAC - sha256, as well as the base64 encode/decode from rolands' bcrypt calls:   

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

use the 32 bit version (10.5)

 

they work in both web and client server

 

 

Comment
  1. Thomas Rolseth
  2. Tuesday, 30 April 2019 14:17 PM UTC
Did you have to change anything in the bcrypt object? Any special PowerServer config setting? A change in IIS? I'm using bcrypt now but the of_encryptdecrypt() method always returns a null value -- I believe because the secret key passed as an argument doesn't get hashed. Thanks, Tom
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 30 April 2019 00:40 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

I think that my Cryptoapi code doesn't work because the underlying API requires a user profile. The newer Bcrypt API does not.

Comment
There are no comments made yet.
Thomas Rolseth Accepted Answer Pending Moderation
  1. Wednesday, 1 May 2019 15:11 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 3

Mike, what did you change in the n_bcrypt userobject in order to get things to work in PowerServer?  So far I've done the following:

 

  1. made sure I'm deploying the 32 bit dll's
  2. using 'ALIAS FOR' and the ansi encoding option in the external function declarations
  3. initializing blob variables with Blob('') instead of setnull

Nothing has worked so far.  The call to of_hashblob always returns an empty string.

Thanks, Tom

Comment
  1. mike S
  2. Wednesday, 1 May 2019 16:34 PM UTC
  1. Helpful
  1. mike S
  2. Thursday, 2 May 2019 13:26 PM UTC
i can email you that earlier version that i have that works. that is probably a good starting point
  1. Helpful
  1. Thomas Rolseth
  2. Thursday, 2 May 2019 18:29 PM UTC
that would be fine -- thanks



trolseth@gmail.com

  1. Helpful
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.