<commit_before><p class="help-block" translate>
The TOTP token is a time based token. You can paste a secret key or
    have the server generate the secret and scan the QR code with a
    smartphone app like the Google Authenticator or FreeOTP turning your
    smartphone into an authentication device.
</p>

<h4 translate>Token data</h4>

<div class="form-group">
    <div ng-hide="checkRight('totp_force_server_generate')">
        <input type="checkbox" ng-model="form.genkey"
               name="generate" id="generate">
        <label for="generate" translate>Generate OTP Key on the Server</label>
    </div>

    <div ng-show="form.genkey">
        <p class="help-block" translate>
            The server will create the OTP key
            and a QR Code
            will be
            displayed to you to be scanned.
        </p>
    </div>
</div>
<div class="form-group" ng-hide="form.genkey">
    <label for="otpkey" translate>OTP Key</label>
    <input type="text" ng-pattern="/^[0-9a-fA-F]*$/"
           autofocus
           class="form-control"
           placeholder="{{ 'Enter OTP key...'|translate }}"
           ng-model="form.otpkey" name="otpkey">
</div>
<div class="form-group"
    ng-hide="checkRight('totp_otplen')">
    <label for="otplen" translate>OTP length</label>
    <select class="form-control"
            id="otplen"
            ng-model="form.otplen"
            ng-options="otplen for otplen in formInit.otplens">
    </select>
    <p class="help-block" ng-show="form.genkey" translate>
        The Google Authenticator only supports an OTP length of 6.
    </p>
</div>
<div class="form-group"
    ng-hide="checkRight('totp_timestep')">
    <label for="timestep" translate>Timestep</label>
    <select class="form-control"
            ng-model="form.timeStep"
            name="timestep"
            ng-options="timestep for timestep in formInit.timesteps"></select>
    seconds.
</div>

<div class="form-group"
    ng-hide="checkRight('totp_hashlib')">
    <label for="hashlib" translate>Hash algorithm</label>
    <select class="form-control"
            id="hashlib"
            ng-model="form.hashlib"
            ng-options="hashlib for hashlib in formInit.hashlibs">
    </select>
    <p class="help-block" ng-show="form.genkey" translate>
        The Google Authenticator only supports the SHA1 algorithm.
    </p>
</div><commit_msg>revert totp hashlib in token creation<commit_after><p class="help-block" translate>
The TOTP token is a time based token. You can paste a secret key or
    have the server generate the secret and scan the QR code with a
    smartphone app like the Google Authenticator or FreeOTP turning your
    smartphone into an authentication device.
</p>

<h4 translate>Token data</h4>

<div class="form-group">
    <div ng-hide="checkRight('totp_force_server_generate')">
        <input type="checkbox" ng-model="form.genkey"
               name="generate" id="generate">
        <label for="generate" translate>Generate OTP Key on the Server</label>
    </div>

    <div ng-show="form.genkey">
        <p class="help-block" translate>
            The server will create the OTP key
            and a QR Code
            will be
            displayed to you to be scanned.
        </p>
    </div>
</div>
<div class="form-group" ng-hide="form.genkey">
    <label for="otpkey" translate>OTP Key</label>
    <input type="text" ng-pattern="/^[0-9a-fA-F]*$/"
           autofocus
           class="form-control"
           placeholder="{{ 'Enter OTP key...'|translate }}"
           ng-model="form.otpkey" name="otpkey">
</div>
<div class="form-group"
    ng-hide="checkRight('totp_otplen')">
    <label for="otplen" translate>OTP length</label>
    <select class="form-control"
            id="otplen"
            ng-model="form.otplen"
            ng-options="otplen for otplen in formInit.otplens">
    </select>
    <p class="help-block" ng-show="form.genkey" translate>
        The Google Authenticator only supports an OTP length of 6.
    </p>
</div>
<div class="form-group"
    ng-hide="checkRight('totp_timestep')">
    <label for="timestep" translate>Timestep</label>
    <select class="form-control"
            ng-model="form.timeStep"
            name="timestep"
            ng-options="timestep for timestep in formInit.timesteps"></select>
    seconds.
</div>

<div class="form-group"
    ng-hide="checkRight('totp_hashlib')">
    <label for="hashlib" translate>Hash algorithm</label>
    <select class="form-control"
            id="hashlib"
            ng-model="form['totp.hashlib']"
            ng-options="hashlib for hashlib in formInit.hashlibs">
    </select>
    <p class="help-block" ng-show="form.genkey" translate>
        The Google Authenticator only supports the SHA1 algorithm.
    </p>
</div>
{'fraction_non_alphanumeric': 0.13581278729628082, 'fraction_numerical': 0.0025073129962390303, 'mean_word_length': 2.734009360374415, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 87, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7589429', 'n_tokens_mistral': 1510, 'n_tokens_neox': 1497, 'n_words': 394}