Ask coding questions

← Back to all posts
Python: how to pass FILES to/from the user? (Save/Browse/Download/Upload) -- in Python
squeegily (0)

I'm trying to create some demos for experimental, historical, proof-of-concept, or otherwise research-focused cryptographic algorithms (starting with a basic Lamport OTS, and using that as a library for an implementation of Lu, Au, and Zhang's 2019 LRS scheme).

I'd like users to be able to easily import and export private and public keys, as well as to save signed or encrypted messages, and upload signature files for validation. I am (as stated twice in the title) coding in Python, and would like to build something less cumbersome than having people copy/paste ASCII-armored DER blobs in and out of the Terminal.

Does Replit provide any API for this?

Comments
hotnewtop
Coder100 (18099)

Hello

Unfortunately you can't do that, but you can just write the user data to a file on the repl, and ask the user to fork it.

JBloves27 (1882)

I don't think so. It seems like you might want to search online for such an API, module, etc. You could ask on replit discord as well, for more info.

Hope this helps!