* Make a new key, of the assigned encoding.
* @param {String=} encoding
* @param {String=} algorithm
- * @returns {String|Buffer}
+ * @returns {Promise<String|Buffer>}
*/
static async createKey(algorithm = 'sha1', encoding = 'hex') {
const key = await randomBytesAsync(this._algorithmKeyLength(algorithm));
static get _qrURIDefaultOptions() {
return {
+ issuer: '',
scheme: 'otpauth',
type: this._type,
};