9 references to Assert
Microsoft.AspNetCore.Cryptography.Internal (9)
Cng\BCRYPT_KEY_LENGTHS_STRUCT.cs (1)
27
CryptoUtil.
Assert
(keyLengthInBits % 8 == 0, "keyLengthInBits % 8 == 0");
CryptoUtil.cs (2)
32
Assert
(safeHandle != null && !safeHandle.IsInvalid, "Safe handle is invalid.");
99
Assert
(countA == countB, "countA == countB");
SafeHandles\BCryptAlgorithmHandle.cs (6)
72
CryptoUtil.
Assert
(byteLengthOfNameWithTerminatingNull % sizeof(char) == 0 && byteLengthOfNameWithTerminatingNull > sizeof(char) && byteLengthOfNameWithTerminatingNull <= StackAllocCharSize * sizeof(char), "byteLengthOfNameWithTerminatingNull % sizeof(char) == 0 && byteLengthOfNameWithTerminatingNull > sizeof(char) && byteLengthOfNameWithTerminatingNull <= StackAllocCharSize * sizeof(char)");
82
CryptoUtil.
Assert
(numBytesCopied == byteLengthOfNameWithTerminatingNull, "numBytesCopied == byteLengthOfNameWithTerminatingNull");
93
CryptoUtil.
Assert
(numBytesCopied == sizeof(uint), "numBytesCopied == sizeof(uint)");
104
CryptoUtil.
Assert
(numBytesCopied == sizeof(uint), "numBytesCopied == sizeof(uint)");
115
CryptoUtil.
Assert
(numBytesCopied == sizeof(BCRYPT_KEY_LENGTHS_STRUCT), "numBytesCopied == sizeof(BCRYPT_KEY_LENGTHS_STRUCT)");
126
CryptoUtil.
Assert
(numBytesCopied == sizeof(uint), "numBytesCopied == sizeof(uint)");