def __generateOTPKs(self, num_otpks = None):
        """
        Generate the given amount of OTPKs.

        :param num_otpks: Either an integer or None.

        If the value of num_otpks is None, set it to the max_num_otpks value of the
        configuration.
        """

        if num_otpks == None:
            num_otpks = self.__max_num_otpks
        
        otpks = []

        for _ in range(num_otpks):
            otpks.append(self.__KeyPair.generate())

        try:
            self.__otpks.extend(otpks)
        except AttributeError:
            self.__otpks = otpks
def __generateOTPKs ( self , num_otpks = None ) : if num_otpks == None : num_otpks = self . __max_num_otpks otpks = [ ] for _ in range ( num_otpks ) : otpks . append ( self . __KeyPair . generate ( ) ) try : self . __otpks . extend ( otpks ) except AttributeError : self . __otpks = otpks
Generate the given amount of OTPKs.

        :param num_otpks: Either an integer or None.

        If the value of num_otpks is None, set it to the max_num_otpks value of the
        configuration.