Ask coding questions

← Back to all posts
Chatroom
Bunnytoes (158)

Eventually I will make chatroom but for now I need some help, I am making this, but I need to save the information because in the way I have it every time some who doesn't own the repl runs it the files delete. Also I need help with the login, and should I store the salts? Also how can I remove the salt from the hashed password or add it to a hashed password? It uses a PBKDF2 algorithm to hash it

Comments
hotnewtop
Coder100 (18222)

Sure, you could use C#'s way to make a simple db client:
https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/console-webapiclient

maybe I'll make a library for that sometime

anyways
after that, all you would do is just store json, and you could parse the json.

Bunnytoes (158)

@Coder100 the using System.Net.Http.Headers doesn't work on replit andusing System.Text.Json also doesn't work. Also I need a way to unsalt and resalt is there a way to do that?I just set up a little http thing

Coder100 (18222)

you should not ever unsalt the strings
only salt them

and then when a user logs in
you salt their password
and compare the hashes @Bunnytoes

Bunnytoes (158)

@Coder100 I was think to do that, but the salt is random, but since I use the same hashing algorithm then the 2 hashes will be the same. Also like I said I made the http now what?

HttpListener server = new HttpListener();  // this is the http server
server.Prefixes.Add("http://127.0.0.1/");  //we set a listening address here (localhost)
server.Prefixes.Add("http://localhost/");

server.Start();

could I please invite you to help with the project?

DynamicSquid (4937)

You can use Replit DB, but it only supports Python, Node, and Go. You can use C# with curl, but it's a little hard to get started.

Maybe try rewriting it in Python?

cuber1515 (62)

I found this it might help.

Bunnytoes (158)

@cuber1515 unfortionatly this wasn't very helpful :(