I have an api
that I want allow users to send an id
to, but I don't want the id to be visible over a network. I decided that I will then generate a secret
for the user which will be used as a salt to hash the id
they send. They will then take that id
and secret
to connect to my api
.
The server is written with node.js
, and the client will be written in c#
, so I need a way so that both languages can encode/decode if they know the secret
.
So...
C#
will encode theid
Node.js
will decode theid
I have never create an salt like this before, so what method(s) can I use to do this? I think eventually I will be using more just C#
to encode the id
, so methods for other languages would be awesome too!