Skip to content

Commit

Permalink
For BLE keys
Browse files Browse the repository at this point in the history
  • Loading branch information
yoprogramo committed Jul 22, 2021
1 parent a21bbc9 commit a9e1514
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions nomorepass/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def getQrNomorekeys (self,site, user, password, type, extra):
""" basically the same as getQRSend but with nomorekeys:// """
""" only available for soundkey and lightkey right now """
""" SOUNDKEY passwords are limited to 14 characters """
if type!="SOUNDKEY" and type!="LIGHTKEY":
if type!="SOUNDKEY" and type!="LIGHTKEY" and type!="BLEKEY":
return False
if (site==None):
site='WEBDEVICE'
Expand Down Expand Up @@ -101,10 +101,11 @@ def getQrNomorekeys (self,site, user, password, type, extra):
if (type=='SOUNDKEY'):
password = password[:14].ljust(14)
else:
#lightkeys son un solo entero, la clave ha de ser
#un numero de 0 a 65536 (unsigned) por lo que
#hacemos el resto y volvemos a pasar a cadena
password = str(int(password)%65536)
if type=='LIGHTKEY':
#lightkeys son un solo entero, la clave ha de ser
#un numero de 0 a 65536 (unsigned) por lo que
#hacemos el resto y volvemos a pasar a cadena
password = str(int(password)%65536)
ep = nmp_encrypt(password,tk)
if (isinstance(extra,dict)):
if 'extra' in extra.keys():
Expand Down

0 comments on commit a9e1514

Please sign in to comment.