func (e *Engine) WithUnboxer(ctx context.Context, encMec, mecNonce []byte,
	privKP *EncryptionKeyPair, pubKey []byte, fn func(Unboxer) error) error {

	mek, err := e.Unbox(ctx, encMec, mecNonce, privKP, pubKey)
	if err != nil {
		return err
	}

	err = ctxutil.ErrIfDone(ctx)
	if err != nil {
		return err
	}

	u := unboxerImpl{mek: mek}

	return fn(&u)
}
// WithUnboxer returns an Unboxer for unboxing credentials within the context
// of the provided keypairs.
WithUnboxer returns an Unboxer for unboxing credentials within the context
of the provided keypairs.
// WithUnboxer returns an Unboxer for unboxing credentials within the context // of the provided keypairs .
func (e *Engine) WithUnboxer(ctx context.Context, encMec, mecNonce []byte,
	privKP *EncryptionKeyPair, pubKey []byte, fn func(Unboxer) error) error {
	mek, err := e.Unbox(ctx, encMec, mecNonce, privKP, pubKey)
	if err != nil {
		return err
	}
	err = ctxutil.ErrIfDone(ctx)
	if err != nil {
		return err
	}
	u := unboxerImpl{mek: mek}
	return fn(&u)
}
func ( e * Engine ) WithUnboxer ( ctx context . Context , encMec , mecNonce [ ] byte , privKP * EncryptionKeyPair , pubKey [ ] byte , fn func ( Unboxer ) error ) error { mek , err := e . Unbox ( ctx , encMec , mecNonce , privKP , pubKey ) if err != nil { return err } err = ctxutil . ErrIfDone ( ctx ) if err != nil { return err } u := unboxerImpl { mek : mek } return fn ( & u ) }
WithUnboxer returns an Unboxer for unboxing credentials within the context
of the provided keypairs.
WithUnboxer returns an Unboxer for unboxing credentials within the context of the provided keypairs .