def put(msg, pin, exp): logger.debug("Start encryption") encrypted_msg = libencryption.encrypt(msg) logger.debug("Finished encryption: " + encrypted_msg) logger.debug("Start app to put data into the database") sid = lib.put_secret(encrypted_msg, pin, exp) return jsonify(sid=sid)
def put(msg, pin, exp): logger.debug("Start app to put data into the database") sid = lib.put_secret(msg, pin, exp) return jsonify(sid=sid)
import lib msg = "privet" exp = 600 pin = 1234 sid = lib.put_secret(msg, pin, exp) msg = lib.get_secret(sid, pin) print(msg)
def put(msg, pin, exp): return lib.put_secret(msg, pin, exp)
def put(msg, pin, exp): logger.debug("Start app to put data into the database") msgn = msg.encode('base64', 'strict') sid = lib.put_secret(msgn, pin, exp) return jsonify(sid=sid)