private RSA_PUBLIC_KEY ParseRsaPublicKey(byte[] data, ref int currentIndex)
{
RSA_PUBLIC_KEY key = new RSA_PUBLIC_KEY();
// RSA_PUBLIC_KEY: magic
key.magic = (magic_Values)ParseUInt32(data, ref currentIndex, false);
// RSA_PUBLIC_KEY: keylen
key.keylen = ParseUInt32(data, ref currentIndex, false);
// RSA_PUBLIC_KEY: keylen
key.bitlen = ParseUInt32(data, ref currentIndex, false);
// RSA_PUBLIC_KEY: datalen
key.datalen = ParseUInt32(data, ref currentIndex, false);
// RSA_PUBLIC_KEY: pubExp
key.pubExp = ParseUInt32(data, ref currentIndex, false);
// RSA_PUBLIC_KEY: modulus
key.modulus = GetBytes(data, ref currentIndex, (int)key.keylen);
return key;
}