diff --git a/src/qxor.d b/src/qxor.d index b9e9fb6d..c9cfc874 100644 --- a/src/qxor.d +++ b/src/qxor.d @@ -2,7 +2,7 @@ import std.algorithm; import std.digest.digest; // implementation of the QuickXorHash algorithm in D -// https://github.com/OneDrive/onedrive-api-docs/blob/master/snippets/quickxorhash.md +// https://github.com/OneDrive/onedrive-api-docs/blob/live/docs/code-snippets/quickxorhash.md struct QuickXor { private immutable int widthInBits = 160; @@ -32,9 +32,9 @@ struct QuickXor } else { int index1 = vectorArrayIndex; int index2 = isLastCell ? 0 : (vectorArrayIndex + 1); - byte low = cast(byte) (bitsInVectorCell - vectorOffset); + ubyte low = cast(ubyte) (bitsInVectorCell - vectorOffset); - byte xoredByte = 0; + ubyte xoredByte = 0; for (size_t j = i; j < array.length; j += widthInBits) { xoredByte ^= array[j]; }