コード例 #1
0
 internal static void EvpCipherSetKeyAndIV(
     SafeEvpCipherCtxHandle ctx,
     ReadOnlySpan <byte> key,
     ReadOnlySpan <byte> iv,
     EvpCipherDirection direction)
 {
     if (!EvpCipherSetKeyAndIV(
             ctx,
             ref MemoryMarshal.GetReference(key),
             ref MemoryMarshal.GetReference(iv),
             direction))
     {
         throw new CryptographicException();
     }
 }
コード例 #2
0
 private static extern bool EvpCipherSetKeyAndIV(
     SafeEvpCipherCtxHandle ctx,
     ref byte key,
     ref byte iv,
     EvpCipherDirection direction);