Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpbcgr.RdpbcgrDecoder.ParseRsaPublicKey C# (CSharp) Method

ParseRsaPublicKey() private method

Parse RSA_PUBLIC_KEY (parser index is updated according to parsed length)
private ParseRsaPublicKey ( byte data, int &currentIndex ) : RSA_PUBLIC_KEY
data byte data to be parsed
currentIndex int current parser index
return RSA_PUBLIC_KEY
        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;
        }
RdpbcgrDecoder