internal EncryptionResult(IntPtr rPtr)
        {
            invalid_recipients = null;

            if (rPtr == IntPtr.Zero)
            {
                throw new InvalidPtrException("An invalid pointer for the encrypt_result structure has been supplied.");
            }
            UpdateFromMem(rPtr);
        }
        private void UpdateFromMem(IntPtr rPtr)
        {
            _gpgme_op_encrypt_result rst = new _gpgme_op_encrypt_result();

            Marshal.PtrToStructure(rPtr, rst);

            if (rst.invalid_recipients != IntPtr.Zero)
            {
                invalid_recipients = new InvalidKey(rst.invalid_recipients);
            }
        }
Example #3
0
        private void UpdateFromMem(IntPtr sigrstPtr)
        {
            _gpgme_op_sign_result rst = new _gpgme_op_sign_result();

            Marshal.PtrToStructure(sigrstPtr, rst);

            if (!rst.invalid_signers.Equals(IntPtr.Zero))
            {
                invalid_signers = new InvalidKey(rst.invalid_signers);
            }

            if (!rst.signatures.Equals(IntPtr.Zero))
            {
                signatures = new NewSignature(rst.signatures);
            }
        }