Serubin / pulse-sms-web

The official web app for Pulse SMS - built on Vue.js.

Home Page:https://pulsesms.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve Decryption Worker

Serubin opened this issue · comments

This was meant to be more impressive - but I wasted a day and couldn't create the improvements I wanted.

For tracking my original intent was to:

  • Reduce to one worker
  • Use aes from vue store rather than reloading key

Instead: We're just terminating the worker once it's job has been completed.

I had so many issues getting these set up and definitely wasted about that much time on it too. While I am disappointed you weren't able to get to the original intent, it makes me feel a bit better that I wasn't able to set it up that way from the start....

Happy to assist hah.

I consistently ran into two issues:

  1. When I used our pre-built aes objects from the vuex store, inexplicably a.decrypt from sjcl didn't work. This occurred pretty consistently.
  2. Scoping on a single worker was a nightmare. It seems as though the items were being passed by reference to the worker, which doesn't make any sense on it's own.
  1. was absolutely infuriating for me. Couldn't understand it at all
  2. yeah, I really don't have a clue on that one.

I am just going to accept what we have here. I don't plan on diving back in to them, at least! It is a really cool way to do the decryption, and I am glad that it works, but I just don't think we need to spend any more time on it at this point.