public HOTPService(AMIdentityRepository amIdentityRepo,String userName,HOTPParams hotpParams){
  this.amIdentityRepo=amIdentityRepo;
  this.userName=userName;
  this.gatewaySMSImplClass=hotpParams.getGatewaySMSImplClass();
  this.codeValidityDuration=hotpParams.getCodeValidityDuration();
  this.codeLength=hotpParams.getCodeLength();
  this.codeDelivery=hotpParams.getCodeDelivery();
  this.telephoneAttribute=hotpParams.getTelephoneLdapAttributeName();
  this.carrierAttribute=hotpParams.getCarrierLdapAttributeName();
  this.emailAttribute=hotpParams.getEmailLdapAttributeName();
  this.currentConfig=hotpParams.getConfig();
  this.messageSubject=hotpParams.getMessageSubject();
  this.messageContent=hotpParams.getMessageContent();
  this.fromAddressAttributeName=hotpParams.getFromAddressAttributeName();
  this.userSearchAttributes=hotpParams.getUserSearchAttributes();
  try {
    secureRandom=SecureRandom.getInstance("SHA1PRNG");
  }
 catch (  NoSuchAlgorithmException ex) {
    DEBUG.error("HOTP.HOTP() : HOTP : Initialization Failed",ex);
    secureRandom=null;
  }
}

public HOTPService ( AMIdentityRepository amIdentityRepo , String userName , HOTPParams hotpParams ) { this . amIdentityRepo = amIdentityRepo ; this . userName = userName ; this . gatewaySMSImplClass = hotpParams . getGatewaySMSImplClass ( ) ; this . codeValidityDuration = hotpParams . getCodeValidityDuration ( ) ; this . codeLength = hotpParams . getCodeLength ( ) ; this . codeDelivery = hotpParams . getCodeDelivery ( ) ; this . telephoneAttribute = hotpParams . getTelephoneLdapAttributeName ( ) ; this . carrierAttribute = hotpParams . getCarrierLdapAttributeName ( ) ; this . emailAttribute = hotpParams . getEmailLdapAttributeName ( ) ; this . currentConfig = hotpParams . getConfig ( ) ; this . messageSubject = hotpParams . getMessageSubject ( ) ; this . messageContent = hotpParams . getMessageContent ( ) ; this . fromAddressAttributeName = hotpParams . getFromAddressAttributeName ( ) ; this . userSearchAttributes = hotpParams . getUserSearchAttributes ( ) ; try { secureRandom = SecureRandom . getInstance ( "SHA1PRNG" ) ; } catch ( NoSuchAlgorithmException ex ) { DEBUG . error ( "HOTP.HOTP() : HOTP : Initialization Failed" , ex ) ; secureRandom = null ; } }
constructs an instance of the hotpservice .
