Hi! I am pretty new on Dlang and I wanted to make a small password manager that used some sort of encryption on a file (for example AES256) and save a password to decrypt it later, so you can copy the password.
I couldn't find any way of doing encryption on Dlang, is there a lib that's better for doing this? Secured and some other libs i tried didn't quite work.
I also don't know how I could store the password (for example in a SHA256 hash) for decrypting the files.
Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
May 17, 2021 Encryption | ||||
---|---|---|---|---|
| ||||
May 17, 2021 Re: Encryption | ||||
---|---|---|---|---|
| ||||
Posted in reply to noid | On Monday, 17 May 2021 at 16:54:18 UTC, noid wrote: >Hi! I am pretty new on Dlang and I wanted to make a small password manager that used some sort of encryption on a file (for example AES256) and save a password to decrypt it later, so you can copy the password. |
May 17, 2021 Re: Encryption | ||||
---|---|---|---|---|
| ||||
Posted in reply to noid | On Monday, 17 May 2021 at 16:54:18 UTC, noid wrote: >Hi! I am pretty new on Dlang and I wanted to make a small password manager that used some sort of encryption on a file (for example AES256) and save a password to decrypt it later, so you can copy the password. |
May 17, 2021 Re: Encryption | ||||
---|---|---|---|---|
| ||||
Posted in reply to mw | On Monday, 17 May 2021 at 16:59:28 UTC, mw wrote: >On Monday, 17 May 2021 at 16:54:18 UTC, noid wrote: >Hi! I am pretty new on Dlang and I wanted to make a small password manager that used some sort of encryption on a file (for example AES256) and save a password to decrypt it later, so you can copy the password. okay thanks i'll take a look at those libs but what about AES256? the crypto lib gave me some errors every time i ran "dub run" about the crypto lib "cannot call impure function 'core.bitop.volatileStore'" |
May 17, 2021 Re: Encryption | ||||
---|---|---|---|---|
| ||||
Posted in reply to Imperatorn | On Monday, 17 May 2021 at 17:03:39 UTC, Imperatorn wrote: >On Monday, 17 May 2021 at 16:54:18 UTC, noid wrote: >Hi! I am pretty new on Dlang and I wanted to make a small password manager that used some sort of encryption on a file (for example AES256) and save a password to decrypt it later, so you can copy the password. crypto prints the error i just posted last post, botan lib gives me this error:
|
May 17, 2021 Re: Encryption | ||||
---|---|---|---|---|
| ||||
Posted in reply to noid | On Monday, 17 May 2021 at 17:08:41 UTC, noid wrote: >On Monday, 17 May 2021 at 17:03:39 UTC, Imperatorn wrote: >On Monday, 17 May 2021 at 16:54:18 UTC, noid wrote: >Hi! I am pretty new on Dlang and I wanted to make a small password manager that used some sort of encryption on a file (for example AES256) and save a password to decrypt it later, so you can copy the password. crypto prints the error i just posted last post, botan lib gives me this error: Try different compiler options (version=??? to make the static assert true). If still not working, log an issue on the library's git repo page. |
May 17, 2021 Re: Encryption | ||||
---|---|---|---|---|
| ||||
Posted in reply to noid | On Monday, 17 May 2021 at 16:54:18 UTC, noid wrote: >Hi! I am pretty new on Dlang and I wanted to make a small password manager that used some sort of encryption on a file (for example AES256) and save a password to decrypt it later, so you can copy the password. I haven't done this specifically myself, but if I did, I'd probably use bindings to the C libsodium and let it do most the encryption work. this looks reasonable but again I haven't used myself. https://code.dlang.org/packages/libsodiumd Since it is a simple binding to the C library, you'd use it the same way you would from C itself and can look up tutorials for that and easily translate to D. >I also don't know how I could store the password (for example in a SHA256 hash) for decrypting the files. Now this I have done myself, and again, I delegated the real work to a C library called argon2. My library is https://code.dlang.org/packages/arsd-official%3Aargon2 And my docs: If you get the C argon2 library installed, then you can use that D module easily with the |