2020-09-05 16:26:37 +00:00
|
|
|
# basic config
|
|
|
|
from .constants import *
|
|
|
|
from .utils import *
|
2020-09-10 21:32:59 +00:00
|
|
|
from .cli.artcode import *
|
2020-09-10 17:52:07 +00:00
|
|
|
|
2020-09-05 16:26:37 +00:00
|
|
|
# common python imports
|
|
|
|
import os,sys
|
|
|
|
from collections import defaultdict
|
|
|
|
from base64 import b64encode,b64decode
|
2020-10-05 08:21:13 +00:00
|
|
|
import json
|
2020-09-06 11:40:53 +00:00
|
|
|
import binascii,asyncio
|
2020-09-08 15:14:48 +00:00
|
|
|
from pprint import pprint
|
2020-09-04 12:46:22 +00:00
|
|
|
|
2020-09-10 17:52:07 +00:00
|
|
|
|
2020-09-05 16:26:37 +00:00
|
|
|
# common external imports
|
|
|
|
from pythemis.skeygen import KEY_PAIR_TYPE, GenerateKeyPair
|
|
|
|
from pythemis.smessage import SMessage, ssign, sverify
|
|
|
|
from pythemis.skeygen import GenerateSymmetricKey
|
|
|
|
from pythemis.scell import SCellSeal
|
|
|
|
from pythemis.exception import ThemisError
|
2020-09-05 17:31:49 +00:00
|
|
|
|
2020-09-10 12:24:06 +00:00
|
|
|
|
2020-09-10 17:52:07 +00:00
|
|
|
try:
|
|
|
|
import getch
|
|
|
|
def getpass(prompt):
|
|
|
|
"""Replacement for getpass.getpass() which prints asterisks for each character typed"""
|
|
|
|
print(prompt, end='', flush=True)
|
|
|
|
buf = ''
|
|
|
|
while True:
|
|
|
|
ch = getch.getch()
|
|
|
|
if ch == '\n':
|
|
|
|
print('')
|
|
|
|
break
|
|
|
|
else:
|
|
|
|
buf += ch
|
|
|
|
print('*', end='', flush=True)
|
|
|
|
return buf
|
|
|
|
except ImportError:
|
|
|
|
from getpass import getpass
|
2020-09-10 12:24:06 +00:00
|
|
|
|
|
|
|
from backend import *
|