I’ve built software that connects to a database and does stuff (does not really matter what).
You can also connect from a remote computer to the server but this way is wrong because
if it’s over the net, the connection string is not encrypted.
What I want to do is actually build a sniffer that decrypts data, waiting for a “call” from a client that sends encrypted data, any kind of data, then i can send an encrypted connection string, and get encrypted data (the software will know how to decrypt it and it doesn’t really matter how strong the encryption is).
The “sniffer” should know all the commands I send to it, so it’s probably hard to build it unless it is already built; but it’s a nice challenge.
Not sure what you’re trying to do, but I think what you want to use is Asymmetric Encryption, using Public Key to encrypt and Private Key to decrypt.
The client has the public key to encrypt data to send, and server owns private key. Now you can securely send data.
I hope this is of some help. If not, please clarify your question?