Ejemplo n.º 1
0
 internal static void EncryptEcb(
     ReadOnlySpan <byte> plaintext,
     Span <byte> ciphertext,
     Aes192Key key,
     PaddingMode paddingMode = PaddingMode.Zeros)
 {
     ref var expandedKey = ref MemoryMarshal.GetReference(key.ExpandedKey);
Ejemplo n.º 2
0
        internal static void EncryptGcm(
            ReadOnlySpan <byte> input,
            Span <byte> output,
            ReadOnlySpan <byte> addt,
            ReadOnlySpan <byte> iv,
            Span <byte> tag,
            Aes192Key key)
        {
            Vector128 <byte> tmp1, tmp2, tmp3, tmp4;
            Vector128 <byte> h, h2, h3, h4, t;
            Vector128 <byte> ctr1, ctr2, ctr3, ctr4;
            var one        = One;
            var four       = Four;
            var bswapEpi64 = BswapEpi64;
            var bswapMask  = BswapMask;
            var x          = Vector128 <byte> .Zero;
            Vector128 <byte> y;
            Span <byte>      lastBlock = stackalloc byte[BlockSize];

            ref var expandedKey  = ref MemoryMarshal.GetReference(key.ExpandedKey);