How to decrypt secret chat messages? #501
Unanswered
dustessavdh
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I have a question on how to work with secret chats. I'm currently struggling to get the decryption to work.
When you receive an
UpdateNewEncryptedMessage
it should contain the data somewhere. The data I'm looking for is probably inside the message key. For now I'm only interested in the message with typeEncryptedMessage
since I think these contain actual message data like when someone sends you a message.For context the object looks as follows:
So I'm trying to decrypt the buffer, but I'm getting nowhere. I tried following this library from the same create as gramjs, but written in python.
This is what I ended up with, which is not the best translation of the python code from this function:
This gives me the following error:
The things I couldn't get to work are:
How would I implement this in TypeScript or am I doing it completly wrong?
Beta Was this translation helpful? Give feedback.
All reactions