1 /++ 2 DAuth v0.6.2 - Salted Hashed Password Library for D 3 4 Writen in the D programming language. 5 6 Tested with DMD 2.064.2 through DMD 2.067.0 7 8 Homepage: 9 $(LINK https://github.com/abscissa/DAuth) 10 11 This_API_Reference: 12 $(LINK http://semitwist.com/dauth) 13 14 DMD flags to enable DAuth unittests: 15 ------------------- 16 -unittest -version=DAuth_AllowWeakSecurity -version=DAuth_Unittest 17 ------------------- 18 19 DMD flags to enable DAuth unittests, but silence all non-error output: 20 ------------------- 21 -unittest -version=DAuth_AllowWeakSecurity -version=DAuth_Unittest -version=DAuth_Unittest_Quiet 22 ------------------- 23 24 The module dauth.hashdrbg is also excluded by default because a Phobos pull request 25 is in the works. 26 27 Import all: 28 ------------ 29 import dauth; 30 import dauth.hashdrbg; 31 ------------ 32 33 Copyright: © 2014 Nick Sabalausky 34 License: zlib/libpng license, provided in 35 $(LINK2 LICENSE.txt, https://github.com/Abscissa/DAuth/blob/master/LICENSE.txt). 36 Authors: Nick Sabalausky 37 +/ 38 39 module dauth; 40 41 public import dauth.core; 42 public import dauth.random; 43 44 version(DAuth_Unittest) 45 { 46 import dauth.hashdrbg; 47 48 unittest 49 { 50 import std.process; 51 52 unitlog("Testing different results on different executions"); 53 assert( 54 spawnShell(`rdmd --build-only --force -Isrc -ofbin/genBytes genBytes.d`).wait() 55 == 0, "Failed to compile genBytes.d" 56 ); 57 enum cmd = "bin/genBytes"; 58 auto result1 = execute(cmd); 59 auto result2 = execute(cmd); 60 auto result3 = execute(cmd); 61 assert(result1.status == 0, "Command failed: "~cmd); 62 assert(result2.status == 0, "Command failed: "~cmd); 63 assert(result3.status == 0, "Command failed: "~cmd); 64 65 assert(result1.output != result2.output); 66 assert(result2.output != result3.output); 67 assert(result3.output != result1.output); 68 } 69 }