Beispiel #1
0
 def setSoPin(self, soPin):
     # TODO: we could log the PIN here
     log.debug('setSoPin()')
     iv = geturandom(16)
     enc_soPin = encrypt(soPin, iv)
     self.LinOtpTokenPinSO = unicode(binascii.hexlify(enc_soPin))
     self.LinOtpTokenPinSOIV = unicode(binascii.hexlify(iv))
Beispiel #2
0
 def setSoPin(self, soPin):
     # TODO: we could log the PIN here
     log.debug('setSoPin()')
     iv = geturandom(16)
     enc_soPin = encrypt(soPin, iv)
     self.LinOtpTokenPinSO = unicode(binascii.hexlify(enc_soPin))
     self.LinOtpTokenPinSOIV = unicode(binascii.hexlify(iv))
Beispiel #3
0
 def setHKey(self, hOtpKey, reset_failcount=True):
     log.debug('setHKey()')
     iv = geturandom(16)
     #bhOtpKey            = binascii.unhexlify(hOtpKey)
     enc_otp_key = encrypt(hOtpKey, iv)
     self.LinOtpKeyEnc = unicode(binascii.hexlify(enc_otp_key))
     self.LinOtpKeyIV = unicode(binascii.hexlify(iv))
     self.LinOtpCount = 0
     if True == reset_failcount:
         self.LinOtpFailCount = 0
Beispiel #4
0
 def setHKey(self, hOtpKey, reset_failcount=True):
     log.debug('setHKey()')
     iv = geturandom(16)
     #bhOtpKey            = binascii.unhexlify(hOtpKey)
     enc_otp_key = encrypt(hOtpKey, iv)
     self.LinOtpKeyEnc = unicode(binascii.hexlify(enc_otp_key))
     self.LinOtpKeyIV = unicode(binascii.hexlify(iv))
     self.LinOtpCount = 0
     if True == reset_failcount:
         self.LinOtpFailCount = 0
Beispiel #5
0
 def setUserPin(self, userPin):
     log.debug('setUserPin()')
     iv = geturandom(16)
     enc_userPin = encrypt(userPin, iv)
     self.LinOtpTokenPinUser = unicode(binascii.hexlify(enc_userPin))
     self.LinOtpTokenPinUserIV = unicode(binascii.hexlify(iv))
Beispiel #6
0
 def setUserPin(self, userPin):
     log.debug('setUserPin()')
     iv = geturandom(16)
     enc_userPin = encrypt(userPin, iv)
     self.LinOtpTokenPinUser = unicode(binascii.hexlify(enc_userPin))
     self.LinOtpTokenPinUserIV = unicode(binascii.hexlify(iv))