title: RSA Encrypt/Decrypt in TypeScript
body: <p>I'm using Angular 4 to make the front end of my application. I have implemented OAuth2 on my backend (developed with Spring in Java), so people using my application must be authenticated.</p>
  
  <p>The thing is that we can see clearly the passwords from the backend server logs and it could be caught by a MITM until I add a SSL.</p>
  
  <p>That's why I decided to encrypt the sent password with RSA. My backend is already ready, but I don't find any up-to-date libraries that <strong>provide a decent API for encrypt/decrypt from a RSA key-pair.</strong></p>
  
  <p>Also seen <code>crypto</code> module, but no longer usable on ECMAS6. The <code>crypto-js</code> one only provides AES and some hashing such as MD5/SHA.</p>