The OpenD Programming Language

hasBlockSize

Checks whether the digest has a blockSize member, which contains the digest's internal block size in bits. It is primarily used by std.digest.hmac.HMAC.

template hasBlockSize (
T
) if (
isDigest!T
) {
enum bool hasBlockSize;
}

Examples

import std.digest.hmac, std.digest.md;
static assert(hasBlockSize!MD5        && MD5.blockSize      == 512);
static assert(hasBlockSize!(HMAC!MD5) && HMAC!MD5.blockSize == 512);

Meta