Read Encrypted Memo using Steem.js

in #utopian-io6 years ago

Steem allows you to send Encrpted message to everyone, and Steem.js already have built-in functions to encode and decode the memo.

If you want to send an encrypted memo to any other people just append '# ' before your memo like below

'# Testing is this is encrypted'

In this tutorial, I will show how you can decrypt the memo send to you. If anyone has send you an encrypted message, the blockchain will show that message as shown below :

image.png

The code to decode the memo is using the function steem.memo.decode() where you have to pass the Memo Private Key as the first argument (memo private key can be of any one of the two i.e. sender or receiver) whereas the encoded message from the blockchain as the second argument as shown below -

steem.memo.decode('Private Memo Key', '#AcWtdaiAKfHS5YkrJcFjtMMfFEzFn78AB23sbwt4TYWhMvevhV1F34hp7gjPDDgTKaaWWV6CnMYjr6ZWEEmMwbo4MpRM5huam9qUbXd9JjJf46uSwK9aRiy3u1s3K2H4DNzCuCopY1v3Yhcjp8r5Rt7')

Once we run the above code after including the Memo Key, the decoded output is shown below :

image.png

Hope this tutorial is helpful if you would like to build your application and wanted to use Encryption of the memo and do not want people to read that memo instead of yourself or the one you have send the memo.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

I've been saying it would be very easy to build an app with secure communications in the Steem original. This actually makes it even easier than I had thought. It's already natively supported, just not integrated into the common UI's.

Yes @josephsavage, that's true. Along with that it is very fast :)

I do not know what you say before you see that you know what you're talking about hahaha, but I miss those incredible photos;) Regards

Hahahah @greensky, yes those photos are coming, stay tuned :P

Thank you man, very cool. Can't wait to get my hands dirty :)

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Thanks @shreyasgune :)

Qurator
Your Quality Content Curator
This post has been upvoted and given the stamp of authenticity by @qurator. To join the quality content creators and receive daily upvotes click here for more info.

Qurator's exclusive support bot is now live. For more info click HERE or send some SBD and your link to @qustodian to get even more support.

Hey @codingdefined I am @utopian-io. I have just upvoted you at 7% Power!

Achievements

  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!
  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • I introduced a competition factor. My vote is based also on how competitive the category used is.

Human Curation

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Hi, this is great information thank you! Sorry to discover it now and not possible to upvote any more ...

May I ask a question? Where should we input the function steem.memo.decode() ?

It has been a while, but this is one of the very few resources on this particular function. I cannot get it to work in the browser, cdn link or internal, I always get an error telling me steem.memo is undefined for both decode and encode. I've tried .auth but it seems that either the parameters/names have changed, or I'm missing something simple. If you have any input on my problem, pls let me know.

I'll try the npm package in node to see if it works. Otherwise I could look into that source or even try to rebuild the functionality if possible. Does it still work on your end?

Appreciate the reply, thanks.

steem.memo Not present in the steem.min.js (Client-Side) and I have created a PR for it, hopefully it will be addresssed.

Thanks for looking into it and letting me know, hopefully it's just a bug and was not left out intentionally. Will be keeping an eye on it.

Wanted to say, glad I found this snippet to decode a memo that was buried in my history. Though the decoded message ended up being garbage. I think....

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.033
BTC 63071.06
ETH 3121.31
USDT 1.00
SBD 3.84