2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-09 13:10:44 +00:00
Comrad/komrade/__init__.py
quadrismegistus db46ee8a65 cli fun
2020-09-10 22:32:59 +01:00

41 lines
1.0 KiB
Python

# basic config
from .constants import *
from .utils import *
from .cli.artcode import *
# common python imports
import os,sys
from collections import defaultdict
from base64 import b64encode,b64decode
import ujson as json
import binascii,asyncio
from pprint import pprint
# 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
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
from backend import *