--- title: "AAL2GenPayloadKeyBlob" slug: "a3s-cppprg-aal2genpayloadkeyblob-4-0" updated: 2026-11-11T10:00:40Z published: 2026-11-11T10:00:40Z canonical: "docs.onespan.com/a3s-cppprg-aal2genpayloadkeyblob-4-0" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # AAL2GenPayloadKeyBlob > The payload key BLOB generation functionality is only applicable to hardware or software Digipass authenticators compliant with the multi-device two-step activation (in the context of multi-device licensing). For more information, refer to the [Authentication Suite Server SDK Product Guide](/secsdks/docs/a3s-product-guide-4-0). > > In addition, payload key BLOBs must be generated only if the Secure Channel feature has been ordered (configured by OneSpan at the time of order). No payload key BLOB must be generated if the Secure Channel feature has not been ordered. ## Function prototype ```cpp aat_int32 AAL2GenPayloadKeyBlob ( TDigipassBlob *DPMAData, TKernelParms *CallParms, aat_ascii *MessageVector, aat_ascii *PKBlob, aat_int32 *PKBlobLength); ``` ## Description This function generates a payload key BLOB embedding a randomly generated payload key. It is only applicable to hardware or software Digipass authenticators compliant with the multi-device two-step activation (in the context of multi-device licensing). For more information, refer to the [Authentication Suite Server SDK Product Guide](/secsdks/docs/a3s-product-guide-4-0). The Secure Channel feature, optionally applicable after the activation of a compliant Digipass authenticator, allows protecting the messages exchanged between the server and the client (request messages and deactivation messages). During the activation process, the Secure Channel feature requires provisioning of a payload key represented on the server-side by a payload key BLOB. In this case, first a payload key BLOB will have to be generated once for each Digipass serial number license. > Payload key BLOBs must be generated only if the Digipass authenticator uses the Secure Channel feature and have to be post-provisioned (DPX does not contain payload key). > > No payload key BLOB must be generated if the payload key BLOB has been obtained during import (AAL2DPXGetTokenBlobsEx2) or if the Digipass authenticator does not support the Secure Channel feature. The different Digipass instances activated from one Digipass serial number license must use the same payload key BLOB to be provisioned with the same payload key. ## Parameters | Type | Name | Use | Description | | --- | --- | --- | --- | | TDigipassBlob | DPMAData | I/O | Digipass master activation application BLOB of the Digipass serial number license that will be used for the activation. Upon return from the function call, this BLOB must be rewritten to the application database to reflect changes. | | TKernelParms * | CallParms | I | Structure of runtime parameters to use during this function call. | | aat_ascii * | MessageVector | I | A string of up to 26+1 characters containing the message parameter settings, null-terminated (obtained during import). | | aat_ascii * | PKBlob | O | A string of 88+1 characters, null-terminated. It contains the generated payload key BLOB for a Digipass serial number license. Upon return from the function call, this BLOB must be rewritten to the application database to reflect changes. | | aat_int32 * | PKBloblength | I/O | In input, this parameter must indicate the size of the allocated buffer for the PKBlob parameter (recommended 89 bytes). In output, this parameter indicates the length of the PKBlob string (without the null-terminated character). | ## Return codes | Code | Meaning | Code | Meaning | | --- | --- | --- | --- | | 0 | Success | 1265 | Invalid master application data pointer | | 412 | Invalid checksum | 1266 | Invalid message vector pointer | | 413 | Invalid Base64 format | 1267 | Invalid message vector length | | 1000 | Function does not support EMV-CAP | 1268 | Invalid message vector version | | 1025 | Buffer too small | 1286 | Invalid payload key data pointer | | 1118 | Unsupported BLOB | 1287 | Invalid payload key data length pointer | | 1262 | Payload key data buffer too small | 1310 | Invalid payload key type | | 1264 | Invalid master application | 1316 | Secure Channel not supported |