Generate Backup Codes
AI-generatedSummary
Generate a specified number of backup codes with a given length and format, optionally hashed using the selected algorithm.
Inputs
- backupCodeCount — The number of backup codes to generate
- backupCodeLength — The length of each backup code
- backupCodeFormat — The format of the backup codes
- backupCodeHashAlgorithm — Algorithm to use for hashing backup codes (hashes are included alongside plain codes)
Output shape
array of backup code objects with plain codes and, if hashing is enabled, their corresponding hashes
The source does not specify the exact return structure beyond the operation invoking the generateBackupCodes handler; output includes codes per the hash algorithm setting.
Examples
Example 1: Generate 5 alphanumeric backup codes of length 8, unhashed
backupCodeCount=5, backupCodeLength=8, backupCodeFormat=alphanumeric, backupCodeHashAlgorithm=none