@@ -150,14 +150,14 @@ unittest
150150 assert (toHexString! (LetterCase.lower)(vec3) == " d1aacafea3a9fdf3ee6236b1b45527974ea01539b4a7cc493bba56e15e14d520" );
151151}
152152
153- @safe public KdfResult hkdf(const ubyte [] key, ulong outputLen) {
153+ @safe public KdfResult hkdf(const ubyte [] key, size_t outputLen) {
154154 KdfResult result;
155155 result.salt = random(getHashLength(HashAlgorithm.SHA2_384 ));
156156 result.key = hkdf_ex(key, result.salt, string .init, outputLen, HashAlgorithm.SHA2_384 );
157157 return result;
158158}
159159
160- @trusted public ubyte [] hkdf_ex(const ubyte [] key, const ubyte [] salt, string info, ulong outputLen, HashAlgorithm func) {
160+ @trusted public ubyte [] hkdf_ex(const ubyte [] key, const ubyte [] salt, string info, size_t outputLen, HashAlgorithm func) {
161161 if (key.length == 0 ) {
162162 throw new CryptographicException(" HKDF key cannot be an empty array." );
163163 }
@@ -232,12 +232,12 @@ unittest
232232 return result;
233233}
234234
235- @trusted public ubyte [] scrypt_ex(string password, const ubyte [] salt, ulong n, ulong r, ulong p, ulong maxMemory, ulong length) {
235+ @trusted public ubyte [] scrypt_ex(string password, const ubyte [] salt, ulong n, ulong r, ulong p, ulong maxMemory, size_t length) {
236236 import std.string ;
237237 return scrypt_ex (cast (ubyte [])password.representation, salt, n, r, p, maxMemory, length);
238238}
239239
240- @trusted public ubyte [] scrypt_ex(const ubyte [] password, const ubyte [] salt, ulong n, ulong r, ulong p, ulong maxMemory, ulong length) {
240+ @trusted public ubyte [] scrypt_ex(const ubyte [] password, const ubyte [] salt, ulong n, ulong r, ulong p, ulong maxMemory, size_t length) {
241241 ubyte [] hash = new ubyte [length];
242242
243243 if (EVP_PBE_scrypt((cast (char [])password).ptr, password.length, salt.ptr, salt.length, n, r, p, maxMemory, hash.ptr, length) <= 0 ) {
0 commit comments