com.ibm.security.access.mobile.authorization

Class OtpGeneratorContext

  • java.lang.Object
    • com.ibm.security.access.mobile.authorization.OtpGeneratorContext
    • Constructor Summary

      Constructors 
      Constructor and Description
      OtpGeneratorContext(java.lang.String secret, int digits, HmacAlgorithm algorithm)
      Returns a new OtpGeneratorContext with secret, digits and algorithm.
    • Method Summary

      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OtpGeneratorContext

        public OtpGeneratorContext(java.lang.String secret,
                                   int digits,
                                   HmacAlgorithm algorithm)
        Returns a new OtpGeneratorContext with secret, digits and algorithm.
        Parameters:
        secret - the secret key used to generate the password, null/empty throws IllegalArgumentException
        digits - a value of 6 or 8 representing the length of the password to be generated. The default is 6.
        algorithm - the algorithm used to generate the password. The default is HmacSHA1 HmacAlgorithm.
        Throws:
        java.lang.IllegalArgumentException - if any parameter is null or out of boundaries

        or if the algorithm is not available