public bool prop_Nonce_IsHexEncoded(NonceLength nonceLength) { string nonce = Crypto.GenerateNonce(nonceLength.Get); return(Regex.IsMatch(nonce, @"\A\b[0-9a-fA-F]+\b\Z")); }
public bool prop_NonceLength_Correct(NonceLength nonceLength) { int hexEncodedNonceLength = nonceLength.Get * 2; // 2 hex chars == 1 byte return(Crypto.GenerateNonce(nonceLength.Get).Length == hexEncodedNonceLength); }