Encrypt string

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
cortecerto
Posts: 7
Joined: Tue 26 Jun 2018 15:32

Encrypt string

Post by cortecerto » Tue 31 Jul 2018 03:39

Hello,
Is there any way to encrypt strings with only MyDAC components? Or do I need a bcrypt component or something like that?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Encrypt string

Post by ViktorV » Tue 31 Jul 2018 08:19

To protect your data, you can use data encryption. MyDAC supports data encryption using the TMyEncryptor component. Take into account, that this component is available only in Professional and Trial Editions. See more details about data encryption in the MyDAC documentation: https://www.devart.com/mydac/docs/encryption.htm

cortecerto
Posts: 7
Joined: Tue 26 Jun 2018 15:32

Re: Encrypt string

Post by cortecerto » Tue 31 Jul 2018 15:46

Hello.
Thanks for answearing me.

Sorry for my bad text. What I really need is a function that converts a string to match a hash from php. In PHP, we have the below code to insert the password in our MySQL database.

$password = password_hash($oldpassword, PASSWORD_DEFAULT);

Since the mobile app has a login screen, I need to convert the string to the same hash format to compare with the one stored in our database.

Is there anything in MyDAC or SecureBridge that we can use?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Encrypt string

Post by ViktorV » Mon 06 Aug 2018 08:48

MyDAC does not support the specified functionality, as getting a password hash using the password_hash() function is related to PHP functionality, but not MySQL server one.

Post Reply