Skip to content
← Back to Community
Storing Encryption Key in replit db
Profile icon
SamKunefeh

I am planning on using python’s cryptography package to encrypt and decrypt an important file with a random Fernet key. The problem is how I store the key, because if just write it to a .txt file, people can fork my repl and easily decrypt the important file with the key. I have eventually decided on storing the key in replit’s database dictionary. However my question is that if people fork my repl, can they access my database?

Answered by RYANTADIPARTHI [earned 5 cycles]
View Answer
Voters
Profile icon
SamKunefeh
Comments
hotnewtop
Profile icon
RYANTADIPARTHI

nope. They can't access it. But if you are talking like run the program, and they accidentally type something correct, and see it, then i guess yes.
But if they fork it, maybe if you are planning to put it somewhere known, they can see it.
Normally, for now, they can't

Profile icon
SamKunefeh

@RYANTADIPARTHI

But if you are talking like run the program, and they accidentally type something
correct, and see it, then i guess yes.

What do you mean by that?

Profile icon
RYANTADIPARTHI

@Jackbaklava like the console stores all your db stuff. And when you type something, they can be accessed. Only if you type the correct thing. That could be one way they get it.

Profile icon
SamKunefeh

@RYANTADIPARTHI Thanks for helping!

Profile icon
RYANTADIPARTHI

@Jackbaklava no problem :)