Simple Encryption Extension

Hello, I’m trying to create a simple encryption extension using Crypto-ts package. Manage to test the package and the encryption and decryption works.

Here a small snippet of the encrypt code.
var ciphertext = CryptoTS.AES.encrypt('some message', 'secret key 123');

Now, here are the issues:

  1. I’m trying to change the string, ‘some message’, to the content of the current cell. I have researched the jupyterlab package a bit and I think it related to activeCell or inputArea but don’t know how to called them.
  2. After decrypted, how to replace it to the current cell. The similarity that I found is the Find and Replace option.
  3. Lastly, how to set up a password for it. The only thing that I found related to password is the Jupyterlab-credentialstore extension. I’m not sure how this extension works as I never try it.

Any advice or suggestion is appreciated.