docs: function totpSecret(secret, options) {
    if (typeof options.algorithm !== 'string') {
      throw new Error('Expecting options.algorithm to be a string');
    }
  
    if (typeof options.encoding !== 'string') {
      throw new Error('Expecting options.encoding to be a string');
    }
  
    const encoded = Buffer.from(secret, options.encoding);
    const algorithm = options.algorithm.toLowerCase();
  
    switch (algorithm) {
      case 'sha1':
        return padSecret(encoded, 20, options.encoding);
      case 'sha256':
        return padSecret(encoded, 32, options.encoding);
      case 'sha512':
        return padSecret(encoded, 64, options.encoding);
      default:
        throw new Error(
          `Unsupported algorithm ${algorithm}. Accepts: sha1, sha256, sha512`
        );
    }
  }