You are here

public static function MoAuthUtilities::indentSecret in Google Authenticator / 2 Factor Authentication - 2FA 7

1 call to MoAuthUtilities::indentSecret()
mo_auth_create_form in ./configure_google_authenticator.inc

File

classes/Utilities.php, line 241
This file is part of miniOrange 2FA module.

Class

MoAuthUtilities
@file This file is part of miniOrange 2FA module.

Code

public static function indentSecret($secret) {
  $strlen = strlen($secret);
  $indented = '';
  for ($i = 0; $i <= $strlen; $i = $i + 4) {
    $indented .= substr($secret, $i, 4) . ' ';
  }
  $indented = trim($indented);
  return $indented;
}