Exemplo n.º 1
0
def dec():
    key = request.form['key'].strip()
    xml = request.form['xml'].strip()
    decrypted = jbelt.dec(xml, base64.b64decode(key))
    return render_template('enc.html', xml=decrypted)
Exemplo n.º 2
0
 def test_encryption(self):
     keys = jbelt.genKeys()
     ecrypted = jbelt.enc(test_xml, str(keys['pub']))
     jbelt.dec(ecrypted, str(keys['priv']))
Exemplo n.º 3
0
def dec():
    key = request.form["key"].strip()
    xml = request.form["xml"].strip()
    decrypted = jbelt.dec(xml, base64.b64decode(key))
    return render_template("enc.html", xml=decrypted)