16 : base(cipherMode.GetCipherIv(iv), blockSizeInBytes, paddingSizeInBytes)
23 _hKey = global::Interop.BCrypt.BCryptImportKey(algorithm,
key);
31 protected override void Dispose(
bool disposing)
40 if (currentIv !=
null)
45 base.Dispose(disposing);
51 if (
input.Overlaps(output, out var elementOffset) && elementOffset != 0)
57 array.AsSpan(0, num).CopyTo(output);
66 num = BCryptTransform(
input, output);
68 if (num !=
input.Length)
86 if (
input.Length != 0)
override int TransformFinal(ReadOnlySpan< byte > input, Span< byte > output)
readonly bool _encrypting
override int Transform(ReadOnlySpan< byte > input, Span< byte > output)
override void Dispose(bool disposing)
BasicSymmetricCipherBCrypt(SafeAlgorithmHandle algorithm, CipherMode cipherMode, int blockSizeInBytes, int paddingSizeInBytes, byte[] key, bool ownsParentHandle, byte[] iv, bool encrypting)
void SetParentHandle(SafeAlgorithmHandle parentHandle)
static unsafe void Clear(Array array)
static void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count)
static string Cryptography_UnexpectedTransformTruncation
static void Return(byte[] array, int clearSize=-1)
static byte[] Rent(int minimumLength)