RegistrationExchange
extends OpaqueExchange
in package
FinalYes
One in-flight enrolment (CONTRACT.md §23).
Table of Contents
Methods
- __construct() : mixed
- Adopts `$handle`, which this exchange now owns and must release exactly once — through `finish`, `close()` or the destructor, whichever comes first.
- __destruct() : mixed
- Releases an exchange the caller abandoned — a login started and never completed. PHP's refcounting makes that prompt rather than eventual.
- close() : void
- Releases the exchange if it was never finished.
- finish() : string
- Seals the envelope under the server's oblivious PRF, returning the hex `RegistrationRecord`.
- request() : string
- The hex `RegistrationRequest` to send to `register/start`.
Methods
__construct()
Adopts `$handle`, which this exchange now owns and must release exactly once — through `finish`, `close()` or the destructor, whichever comes first.
public
__construct(OpaqueNativeInterface $lib, mixed $handle, string $firstMessage) : mixed
Parameters
- $lib : OpaqueNativeInterface
- $handle : mixed
- $firstMessage : string
__destruct()
Releases an exchange the caller abandoned — a login started and never completed. PHP's refcounting makes that prompt rather than eventual.
public
__destruct() : mixed
close()
Releases the exchange if it was never finished.
public
close() : void
Idempotent, and a no-op once finish has spent the handle. Calling it is optional —
__destruct does the same thing — but an application that knows the exchange is over
should not wait for a refcount to say so.
finish()
Seals the envelope under the server's oblivious PRF, returning the hex `RegistrationRecord`.
public
finish(string $password, string $registrationResponse, KsfParams $ksf) : string
Parameters
- $password : string
- $registrationResponse : string
- $ksf : KsfParams
Tags
Return values
stringrequest()
The hex `RegistrationRequest` to send to `register/start`.
public
request() : string