Spaces:
Sleeping
Sleeping
Ahmad Hammoudeh
commited on
Commit
·
09317a6
1
Parent(s):
d4ebda4
Update msg_encX.py
Browse files- msg_encX.py +1 -3
msg_encX.py
CHANGED
|
@@ -24,7 +24,7 @@ def seedx(path , User_passcode=User_passcode0, N_days=N_days0, encryption_diffic
|
|
| 24 |
except:
|
| 25 |
old_day_index = 0
|
| 26 |
print('no old index was found')
|
| 27 |
-
os.environ['old_day_index'] = str(old_day_index)
|
| 28 |
timestamp = datetime.timestamp(datetime.now())
|
| 29 |
#total number of days since unix time
|
| 30 |
days_span = timestamp/math.factorial(6)/120 + 0.1#*random.random() #first time calculate the days since unix, thae latter randomize the time zone by up to ~7 hours
|
|
@@ -40,8 +40,6 @@ def seedx(path , User_passcode=User_passcode0, N_days=N_days0, encryption_diffic
|
|
| 40 |
else:
|
| 41 |
publicKey, privateKey = rsa.newkeys(encryption_difficulty)
|
| 42 |
old_day_index = day_index
|
| 43 |
-
os.environ['publicKey'] = publicKey
|
| 44 |
-
os.environ['old_day_index'] = old_day_index
|
| 45 |
#save in a folder
|
| 46 |
with open(path +'indx.txt', 'w') as f:
|
| 47 |
f.write(str(old_day_index))
|
|
|
|
| 24 |
except:
|
| 25 |
old_day_index = 0
|
| 26 |
print('no old index was found')
|
| 27 |
+
#os.environ['old_day_index'] = str(old_day_index)
|
| 28 |
timestamp = datetime.timestamp(datetime.now())
|
| 29 |
#total number of days since unix time
|
| 30 |
days_span = timestamp/math.factorial(6)/120 + 0.1#*random.random() #first time calculate the days since unix, thae latter randomize the time zone by up to ~7 hours
|
|
|
|
| 40 |
else:
|
| 41 |
publicKey, privateKey = rsa.newkeys(encryption_difficulty)
|
| 42 |
old_day_index = day_index
|
|
|
|
|
|
|
| 43 |
#save in a folder
|
| 44 |
with open(path +'indx.txt', 'w') as f:
|
| 45 |
f.write(str(old_day_index))
|