PreferredAlgorithms
namespace Org.BouncyCastle.Bcpg.Sig
{
public class PreferredAlgorithms : SignatureSubpacket
{
private static int[] DataToPrefs(byte[] data)
{
int[] array = new int[data.Length];
for (int i = 0; i < array.Length; i++) {
array[i] = data[i];
}
return array;
}
private static byte[] PrefsToData(int[] prefs)
{
byte[] array = new byte[prefs.Length];
for (int i = 0; i < prefs.Length; i++) {
array[i] = (byte)prefs[i];
}
return array;
}
public PreferredAlgorithms(SignatureSubpacketTag type, bool critical, bool isLongLength, byte[] data)
: base(type, critical, isLongLength, data)
{
}
public PreferredAlgorithms(SignatureSubpacketTag type, bool critical, int[] preferences)
: base(type, critical, false, PrefsToData(preferences))
{
}
public int[] GetPreferences()
{
return DataToPrefs(base.Data);
}
}
}