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)
def test_encryption(self): keys = jbelt.genKeys() ecrypted = jbelt.enc(test_xml, str(keys['pub'])) jbelt.dec(ecrypted, str(keys['priv']))
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)