[ SOLVED ] Store password into db lazarus / 21-General ---------------------------------------------------------------------- superc · 2022-02-03 15:03 Hello, I must store in my program into db (sqlite or postgres) a username and password; what's for you a best method for store encrypted password? The program must be compiled for win32/win64,macos : in my Lazarus installation I see DCPcipher, but on the site of author I readed " Sadly due to time constraints (and the fact that I don’t use the related platforms any more) both DCPcrypt and confluence-mathjax have been retired.", I am therefore discouraged from using them, perhaps wrongly, but..... Thanks in advance. ---------------------------------------------------------------------- Zvoni · 2022-02-03 15:13 Never store the Password itself (encrypted or otherwise) https://www.vaadata.com/blog/how-to-securely-store-passwords-in- database/ https://stackoverflow.com/questions/1054022/best-way-to-store- password-in-database ---------------------------------------------------------------------- Thaddy · 2022-02-03 17:23 Indeed, never store a password, but store its hash. A good library is https://github.com/Xor-el/CryptoLib4Pascal and the author is often on this forum. ---------------------------------------------------------------------- Edgardo M. López · 2022-02-03 18:04 Another alternative to encryption is DCPcrypt. You just add the package to the project and you're good to go. Check their Wiki there are several examples. https://wiki.freepascal.org/DCPcrypt ---------------------------------------------------------------------- af0815 · 2022-02-03 18:22 Quote from: Edgardo M. López on February 03, 2022, 07:04:38 pmAnother alternative to encryption is DCPcrypt. Have you realy read the first post ?! ---------------------------------------------------------------------- Thaddy · 2022-02-03 18:33 Quote from: Edgardo M. López on February 03, 2022, 07:04:38 pmAnother alternative to encryption is DCPcrypt. You just add the package to the project and you're good to go. Check their Wiki there are several examples. https://wiki.freepascal.org/DCPcrypt No. Abandonware.... ---------------------------------------------------------------------- superc · 2022-02-04 07:26 Quote from: Thaddy on February 03, 2022, 06:23:50 pmIndeed, never store a password, but store its hash. A good library is https://github.com/Xor-el/CryptoLib4Pascal and the author is often on this forum. very very very interesting library; Thank you very much ---------------------------------------------------------------------- PascalDragon · 2022-02-04 14:51 Quote from: Thaddy on February 03, 2022, 07:33:18 pmQuote from: Edgardo M. López on February 03, 2022, 07:04:38 pmAnother alternative to encryption is DCPcrypt. You just add the package to the project and you're good to go. Check their Wiki there are several examples. https://wiki.freepascal.org/DCPcrypt No. Abandonware.... It is planned to integrate DCPcrypt into FPC's distribution and to maintain it. ---------------------------------------------------------------------- Thaddy · 2022-02-04 15:08 Instead, I would ask Xor-El and try include his code. It is way more modern than dcpcrypt (which also has standards issues, even after all those years). His real name might be a bit of a struggle  Ugochukwu Mmaduekwe. Just a suggestion, but I honestly believe his code: 1. adheres to standards 2. is solid code. ---------------------------------------------------------------------- PascalDragon · 2022-02-05 13:14 Quote from: Thaddy on February 04, 2022, 04:08:05 pmInstead, I would ask Xor-El and try include his code. It is way more modern than dcpcrypt (which also has standards issues, even after all those years). This decision was made by Michael van Canneyt and he'll work together with abouchez. See also here.