aboutsummaryrefslogtreecommitdiff
path: root/Tools/Hazel-Networking/Hazel/Crypto/IAes.cs
blob: 6c494cd9641b309372a54e71c3ce0147d290b000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hazel.Crypto
{
    /// <summary>
    /// AES encryption interface
    /// </summary>
    public interface IAes : IDisposable
    {
        /// <summary>
        /// Encrypts the specified region of the input byte array and copies
        /// the resulting transform to the specified region of the output
        /// array.
        /// </summary>
        /// <param name="inputSpan">The input for which to encrypt</param>
        /// <param name="outputSpan">
        /// The otput to which to write the encrypted data. This span can
        /// overlap with `inputSpan`.
        /// </param>
        /// <returns>The number of bytes written</returns>
        int EncryptBlock(ByteSpan inputSpan, ByteSpan outputSpan);
    }
}