13 references to BitsToBytes
System.Security.Cryptography (13)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\AsymmetricAlgorithmHelpers.Der.cs (3)
51int fieldSizeBytes = BitsToBytes(fieldSizeBits); 61int fieldSizeBytes = BitsToBytes(fieldSizeBits); 128int paddedFieldSizeBytes = BitsToBytes(fieldSizeBits + 1);
System\Security\Cryptography\AesCng.Windows.cs (1)
291KeyValue ??= RandomNumberGenerator.GetBytes(AsymmetricAlgorithmHelpers.BitsToBytes(KeySizeValue));
System\Security\Cryptography\CngSymmetricAlgorithmCore.cs (8)
112byte[] key = RandomNumberGenerator.GetBytes(AsymmetricAlgorithmHelpers.BitsToBytes(_outer.BaseKeySize)); 118byte[] iv = RandomNumberGenerator.GetBytes(AsymmetricAlgorithmHelpers.BitsToBytes(_outer.BlockSize)); 171if (!iv.IsEmpty && iv.Length != AsymmetricAlgorithmHelpers.BitsToBytes(_outer.BlockSize)) 182int blockSizeInBytes = AsymmetricAlgorithmHelpers.BitsToBytes(_outer.BlockSize); 202if (rgbIV != null && rgbIV.Length != AsymmetricAlgorithmHelpers.BitsToBytes(_outer.BlockSize)) 216int blockSizeInBytes = AsymmetricAlgorithmHelpers.BitsToBytes(_outer.BlockSize); 241int blockSizeInBytes = AsymmetricAlgorithmHelpers.BitsToBytes(_outer.BlockSize); 259int blockSizeInBytes = AsymmetricAlgorithmHelpers.BitsToBytes(_outer.BlockSize);
System\Security\Cryptography\ECDsa.cs (1)
1269return AsymmetricAlgorithmHelpers.BitsToBytes(fieldSizeBits) * 2;