From cc9815e825be6087d3eb629209dd9609c8d57a60 Mon Sep 17 00:00:00 2001 From: Michael Rochelle Date: Tue, 26 Feb 2019 10:36:38 -0800 Subject: [PATCH] Fixed build failure under windows, missing import for "core.sys.windows.wincrypt". Fixed typo at line 76 "hCryptoProv" to "hCryptProv" --- source/secured/random.d | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/secured/random.d b/source/secured/random.d index b1e55c4..d24c583 100644 --- a/source/secured/random.d +++ b/source/secured/random.d @@ -64,7 +64,9 @@ extern(C) @nogc nothrow private @system else version(Windows) { import core.sys.windows.windows; + import core.sys.windows.wincrypt; import std.format; + HCRYPTPROV hCryptProv; //Get the cryptographic context from Windows @@ -72,7 +74,7 @@ extern(C) @nogc nothrow private @system throw new CryptographicException("Unable to acquire Cryptographic Context."); } //Release the context when finished - scope(exit) CryptReleaseContext(hCryptoProv, 0); + scope(exit) CryptReleaseContext(hCryptProv, 0); //Generate the random bytes if (!CryptGenRandom(hCryptProv, cast(DWORD)buffer.length, buffer.ptr)) {