예제 #1
0
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)
예제 #2
0
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)
예제 #3
0
import lib


msg = "privet"
exp = 600
pin = 1234

sid = lib.put_secret(msg, pin, exp)
msg = lib.get_secret(sid, pin)
print(msg)
예제 #4
0
def put(msg, pin, exp):
    return lib.put_secret(msg, pin, exp)
예제 #5
0
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)