You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
1 year ago
|
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||
|
#pragma warning disable
|
||
|
using System;
|
||
|
|
||
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto
|
||
|
{
|
||
|
/**
|
||
|
* Base interface for mapping from an alphabet to a set of indexes
|
||
|
* suitable for use with FPE.
|
||
|
*/
|
||
|
public interface IAlphabetMapper
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Return the number of characters in the alphabet.
|
||
|
/// </summary>
|
||
|
/// <returns>the radix for the alphabet.</returns>
|
||
|
int Radix { get; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Return the passed in char[] as a byte array of indexes (indexes
|
||
|
/// can be more than 1 byte)
|
||
|
/// </summary>
|
||
|
/// <returns>an index array.</returns>
|
||
|
/// <param name="input">characters to be mapped.</param>
|
||
|
byte[] ConvertToIndexes(char[] input);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Return a char[] for this alphabet based on the indexes passed.
|
||
|
/// </summary>
|
||
|
/// <returns>an array of char corresponding to the index values.</returns>
|
||
|
/// <param name="input">input array of indexes.</param>
|
||
|
char[] ConvertToChars(byte[] input);
|
||
|
}
|
||
|
}
|
||
|
#pragma warning restore
|
||
|
#endif
|