// Implements RopPassCallBack public RopPassCallBack.Ret PassCallBack(RopHandle ffi, object ctx, RopHandle key, RopHandle pgpCtx, RopHandle buf, int bufLen) { if (passProvider != null) { // create new Session and Key handlers RopSession ropSes = null; RopKey ropKey = null; try { if (own.TryGetTarget(out RopBind bind)) { ropSes = (!ffi.IsNull()? new RopSession(bind, ffi) : null); ropKey = (!key.IsNull()? new RopKey(bind, key) : null); SessionPassCallBack.Ret scbRet = passProvider.PassCallBack(ropSes, ctx, ropKey, RopHandle.Str(pgpCtx), bufLen); return(new RopPassCallBack.Ret(scbRet.ret, scbRet.outBuf)); } throw new RopError(RopBind.ROP_ERROR_INTERNAL); } catch (RopError) { } finally { if (ropSes != null) { ropSes.Detach(); } if (ropKey != null) { ropKey.Detach(); } } } return(new RopPassCallBack.Ret(false, null)); }
internal void Attach(RopHandle iid) { if (iid.IsNull()) { throw new RopError(RopBind.ROP_ERROR_NULL_HANDLE); } this.iid = iid; }
internal RopIdIterator(RopBind own, RopHandle iiid) { if (iiid.IsNull()) { throw new RopError(RopBind.ROP_ERROR_NULL_HANDLE); } this.lib = own.getLib(); this.iiid = iiid; }
public RopSignSignature(RopBind own, RopHandle sgid) { if (sgid.IsNull()) { throw new RopError(RopBind.ROP_ERROR_NULL_HANDLE); } this.lib = own.getLib(); this.sgid = sgid; }
internal RopSymEnc(RopBind own, RopHandle seid) { if (seid.IsNull()) { throw new RopError(RopBind.ROP_ERROR_NULL_HANDLE); } this.own = new WeakReference <RopBind>(own); this.lib = own.getLib(); this.seid = seid; }
internal RopRecipient(RopBind own, RopHandle rid) { if (rid.IsNull()) { throw new RopError(RopBind.ROP_ERROR_NULL_HANDLE); } this.own = new WeakReference <RopBind>(own); this.lib = own.getLib(); this.rid = rid; }
internal RopOpEncrypt(RopBind own, RopHandle opid) { if (opid.IsNull()) { throw new RopError(RopBind.ROP_ERROR_NULL_HANDLE); } this.own = new WeakReference <RopBind>(own); this.lib = own.getLib(); this.opid = opid; }
public RopVeriSignature(RopBind own, RopHandle sgid) { if (sgid.IsNull()) { throw new RopError(RopBind.ROP_ERROR_NULL_HANDLE); } this.own = new WeakReference <RopBind>(own); this.lib = own.getLib(); this.sgid = sgid; }
internal RopInput(RopBind own, RopHandle iid) { if (iid.IsNull()) { throw new RopError(RopBind.ROP_ERROR_NULL_HANDLE); } this.own = new WeakReference <RopBind>(own); this.lib = own.getLib(); this.iid = iid; this.inputCB = null; }
internal RopSession(RopBind own, RopHandle sid) { if (sid.IsNull()) { throw new RopError(RopBind.ROP_ERROR_NULL_HANDLE); } this.own = new WeakReference <RopBind>(own); this.lib = own.getLib(); this.sid = sid; this.passProvider = null; this.keyProvider = null; }
// Implements RopKeyCallBack public void KeyCallBack(RopHandle ffi, object ctx, RopHandle identifierType, RopHandle identifier, bool secret) { if (keyProvider != null) { // create a new Session handler RopSession ropSes = null; try { if (own.TryGetTarget(out RopBind bind)) { ropSes = (!ffi.IsNull()? new RopSession(bind, ffi) : null); keyProvider.KeyCallBack(ropSes, ctx, RopHandle.Str(identifierType), RopHandle.Str(identifier), secret); } throw new RopError(RopBind.ROP_ERROR_INTERNAL); } catch (RopError) { } finally { if (ropSes != null) { ropSes.Detach(); } } } }