withPrf

fun withPrf(optionsJson: String, first: ByteArray, second: ByteArray? = null): String

Requests the prf extension evaluated with salts first and optional second.

On request options the results arrive in PasskeyAssertion.prf: the same passkey and salt always give the same 32 bytes, so they can derive an encryption key. On creation options, providers that can evaluate PRF at registration return PasskeyRegistration.prf; others only report PasskeyRegistration.prfEnabled.

Salts are WebAuthn PRF inputs: the platform hashes them with the "WebAuthn PRF" context before they reach the authenticator. Any evalByCredential already in the options is kept.


fun withPrf(creationOptionsJson: String): String

Asks, at registration, whether the new passkey supports PRF; the answer is PasskeyRegistration.prfEnabled. Existing prf inputs (e.g. from withPrf) are kept.