Encryption

noid bielsalamimo at gmail.com
Mon May 17 17:08:41 UTC 2021


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.
>> 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.
>
> https://code.dlang.org/search?q=crypto

crypto prints the error i just posted last post, botan lib gives 
me this error:

```
/home/anon/.dub/packages/memutils-1.0.4/memutils/source/memutils/utils.d:65:18: error: class botan.cert.x509.x509cert.X509CertificateImpl member init is not accessible
    65 |   return cast(TR)T.init;
       |                  ^
/home/anon/.dub/packages/memutils-1.0.4/memutils/source/memutils/utils.d:65:18: error: function botan.cert.x509.x509_obj.X509Object.init (RefCounted!(DataSourceImpl, AppMem) input, const(string) labels) is not callable using argument types ()
    65 |   return cast(TR)T.init;
       |                  ^
/home/anon/.dub/packages/memutils-1.0.4/memutils/source/memutils/refcounted.d:31:52: error: template instance memutils.utils.ObjectAllocator!(X509CertificateImpl, ThreadMem).alloc!() error instantiating
    31 |     ret.m_object = ObjectAllocator!(T, ALLOC).alloc(args);
       |                                                    ^
/home/anon/.dub/packages/memutils-1.0.4/memutils/source/memutils/refcounted.d:199:29: note: instantiated from here: opCall!()
   199 |    auto newObj = this.opCall();
       |                             ^
/home/anon/.dub/packages/botan-1.12.19/botan/source/botan/cert/x509/x509cert.d:41:25: note: instantiated from here: RefCounted!(X509CertificateImpl, ThreadMem)
    41 | alias X509Certificate = RefCounted!X509CertificateImpl;
       |                         ^
/home/anon/.dub/packages/botan-1.12.19/botan/source/botan/constants.d:98:73: error: static assert  (BOTAN_HAS_SIMD) is false
    98 | version(SIMD_SSE2)       {    enum BOTAN_HAS_SIMD_SSE2 = 
true;          static assert(BOTAN_HAS_SIMD);                   }
       |                                                           
               ^
/usr/bin/gdc failed with exit code 1.
```



More information about the Digitalmars-d-learn mailing list