Skip to content

Commit

Permalink
added async sleep during key decryption
Browse files Browse the repository at this point in the history
  • Loading branch information
monty committed Jul 6, 2024
1 parent 9fc6fa6 commit 092398f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/monstr/ident/keystore.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import asyncio
from abc import ABC, abstractmethod
import csv
import logging
Expand Down Expand Up @@ -361,6 +362,7 @@ async def load(self, file_name: str = None):
# decrypt if required
if self._encrypter is not None:
k = await self._encrypter.decrypt_key(key_str)
await asyncio.sleep(0.01)
else:
k = Keys.get_key(key_str)

Expand Down Expand Up @@ -410,6 +412,7 @@ async def _key_from_row(self, row) -> NamedKeys:
# decrypt if required
if self._encrypter is not None:
k = await self._encrypter.decrypt_key(key_str)
await asyncio.sleep(0.01)
else:
k = Keys.get_key(key_str)

Expand Down

0 comments on commit 092398f

Please sign in to comment.