| 
    keycloak-oidc-service
    
   | 
 


公開メンバ関数 | |
| HmacOTP (int numberDigits, String algorithm, int delayWindow) | |
| String | generateHOTP (String key, int counter) | 
| int | validateHOTP (String token, String key, int counter) | 
| String | generateOTP (String key, String counter, int returnDigits, String crypto) | 
静的公開メンバ関数 | |
| static String | generateSecret (int length) | 
静的公開変数類 | |
| static final String | HMAC_SHA1 = "HmacSHA1" | 
| static final String | HMAC_SHA256 = "HmacSHA256" | 
| static final String | HMAC_SHA512 = "HmacSHA512" | 
| static final String | DEFAULT_ALGORITHM = HMAC_SHA1 | 
| static final int | DEFAULT_NUMBER_DIGITS = 6 | 
限定公開変数類 | |
| final String | algorithm | 
| final int | numberDigits | 
| final int | lookAheadWindow | 
非公開メンバ関数 | |
| byte [] | hmac_sha1 (String crypto, byte[] keyBytes, byte[] text) | 
| byte [] | hexStr2Bytes (String hex) | 
静的非公開変数類 | |
| static final int [] | DIGITS_POWER = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000} | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
This method generates an OTP value for the given set of parameters.
| key | the shared secret, HEX encoded | 
| counter | a value that reflects a time | 
| returnDigits | number of digits to return | 
| crypto | the crypto function to use | 
| java.security.GeneralSecurityException | 
      
  | 
  inlinestatic | 
      
  | 
  inlineprivate | 
This method converts HEX string to Byte[]
| hex | the HEX string | 
      
  | 
  inlineprivate | 
This method uses the JCE to provide the crypto algorithm. HMAC computes a Hashed Message Authentication Code with the crypto hash algorithm as a parameter.
| crypto | the crypto algorithm (HmacSHA1, HmacSHA256, HmacSHA512) | 
| keyBytes | the bytes to use for the HMAC key | 
| text | the message or text to be authenticated. | 
| java.security.NoSuchAlgorithmException | |
| java.security.InvalidKeyException | 
      
  | 
  inline | 
| token | |
| key | |
| counter | 
      
  | 
  protected | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  staticprivate | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  protected | 
      
  | 
  protected | 
 1.8.13