--- title: "AAL2GenMigrateBlobCmd" slug: "a3s-cppprg-hsm-aal2genmigrateblobcmd-4-0" updated: 2026-11-11T10:00:40Z published: 2026-11-11T10:00:40Z canonical: "docs.onespan.com/a3s-cppprg-hsm-aal2genmigrateblobcmd-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. # AAL2GenMigrateBlobCmd ## Function prototype ```cpp aat_int32 AAL2GenMigrateBlobCmd( aat_byte *Cmd, aat_int32 *CmdSize, TDigipassBlob *DPData, TKernelParms *CallParms); ``` ## Description This function creates a command which directs the HSM to migrate the authenticator application BLOB using the given data and to return a result in the form of a reply. This authenticator application BLOB migration function can be used to: - Convert a software-encrypted BLOB into an HSM storage key encrypted BLOB (i.e. software-encrypted > HSM-encrypted) ready to be stored in the database. - Migrate an HSM storage key encrypted BLOB to another HSM storage key encrypted BLOB (i.e. HSM storage key 1 > HSM storage key 2). > To migrate from one HSM storage key to another, the old HSM storage key name must be placed in the parameter CallParms > TransportKeyId, and the new HSM storage key name needs to be placed into the CallParms > StorageKeyId parameter before calling AAL2GenMigrateBlobCmd. > > This function must be used with the post-HSM API AAL2ProcMigrateBlobRpl(). You can acquire a software encrypted BLOB using the Digipass Data Import Service of Authentication Suite Server SDK for HSM. This will extract a BLOB but not migrate it. For more information on this service, refer to the [Authentication Suite Server SDK for HSM Product Guide](/secsdks/docs/a3s-hsm-product-guide-4-0). OneSpan recommends using the new function AAL2GenMigrateBlobCmdEx rather than AAL2GenMigrateBlobCmd. ## Parameters | Type | Name | Use | Description | | --- | --- | --- | --- | | aat_byte * | Cmd | O | Up to 282 bytes that serialize the MIGRATE BLOB command type and the input data to the migrate BLOB function on the HSM: - Command type - 2 bytes - An authenticator application BLOB - 192 bytes - Runtime parameters - 80 bytes Plus 8 bytes for Authentication Suite Server SDK internal use. | | aat_int32 * | CmdSize | I/O | On entry, this parameter contains the size of the Cmd buffer.On exit, this parameter contains the length of the Cmd message. | | TDigipassBlob * | DPData | I | authenticator application BLOB. | | TKernelParms * | CallParms | I | Structure of runtime parameters to use during this function call. | ## Return codes | Code | Meaning | Code | Meaning | | --- | --- | --- | --- | | 0 | Success | 590 | Invalid command pointer | | 149 | Invalid initial vector length | 706 | Invalid data buffer pointer | | 151 | Invalid KCV length | 1000 | Function does not support EMV-CAP | | 412 | Invalid checksum (software) | 1018 | Invalid TLV item pointer | | 413 | Invalid Base64 format | 1025 | Data buffer too small | | 510 | Invalid Digipass data pointer | | |