0

Any examples where I can encode some private string and will decode it for someone automatically once he pay for it.

Ex.

  1. I encode the string with password

  2. Upload the contract: pay 1 eth and get the password

  3. Someone pays 1 eth

  4. Buyer received the key to decode the string

And all of this should be done without me sending him the key manually.

Any examples? Is it possible?

I mean I want automatically share some information with someone who paid for it

1 Answer 1

1

You can encrypt something on chain, but when you post the password to the blockchain, anyone can grab that password and decrypt it. So you will have to send the password off-chain to the user. Of course you could automate this and it wouldn’t have to be manual. Have your user post an email to the chain with his purchase, and you can run a server that watches for this purchase event, and send the password to the email that was sent by the user

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.