OpenWebNet password: Difference between revisions

Updated D entry
(+ D entry)
(Updated D entry)
Line 22:
pure nothrow @safe @nogc
in {
//assert(nonce.representation.all!isDigit); //** non-@nogc.
foreach (immutable char c; nonce)
assert(c.isDigit);
} body {
enum ulong m_1 = 0xFFFFFFFFUL0x_FFFF_FFFF_UL;
enum ulong m_8 = 0xFFFFFFF8UL0x_FFFF_FFF8_UL;
enum ulong m_16 = 0xFFFFFFF0UL0x_FFFF_FFF0_UL;
enum ulong m_128 = 0xFFFFFF80UL0x_FFFF_FF80_UL;
enum ulong m_16777216 = 0XFF000000UL0X_FF00_0000_UL;
 
auto flag = true;
Line 133 ⟶ 131:
void ownTestCalcPass(in string sPassword, in string nonce, in ulong expected)
in {
assert(sPassword.representation.all!isDigit);
assert(nonce.representation.all!isDigit);
} body {
immutable password = sPassword.to!ulong;