public byte[] Encrypt(byte[] rgb, bool fOAEP)
 {
     if (rgb == null)
     {
         throw new ArgumentNullException("rgb");
     }
     this.GetKeyPair();
     byte[] result = null;
     RSACryptoServiceProvider.EncryptKey(this._safeKeyHandle, rgb, rgb.Length, fOAEP, JitHelpers.GetObjectHandleOnStack <byte[]>(ref result));
     return(result);
 }
        public byte[] Encrypt(byte[] rgb, bool fOAEP)
        {
            if (rgb == null)
            {
                throw new ArgumentNullException("rgb");
            }
            this.GetKeyPair();
            byte[]        o           = (byte[])null;
            SafeKeyHandle pKeyContext = this._safeKeyHandle;

            byte[] pbKey  = rgb;
            int    length = pbKey.Length;
            int    num    = fOAEP ? 1 : 0;
            ObjectHandleOnStack objectHandleOnStack = JitHelpers.GetObjectHandleOnStack <byte[]>(ref o);

            RSACryptoServiceProvider.EncryptKey(pKeyContext, pbKey, length, num != 0, objectHandleOnStack);
            return(o);
        }