Sunday, September 16, 2018

A helper Node module for the Encryptamajig helper library


I recently had to work with a value encrypted using the Encryptamajig helper library. The value needed to be decrypted in NodeJS using CryptoJS. I ran into several gotchas while replicating the decryption logic in [1] and created a simple node module to help others. The post here [2] helped immensely in determining how to generate the IV and Key.


You can find the encryptamajig-helper module here [3]. I will update this post once I finish the encrypt method.

References

[1] https://github.com/jbubriski/Encryptamajig
[2] https://stackoverflow.com/questions/29807108/derive-key-and-iv-from-string-for-aes-encryption-in-cryptojs-and-php
[3] https://github.com/splinter/encryptamajig-helper

Thursday, May 17, 2018

Setting up a private VSTS NuGet feed on VS2017 for Mac

This is a personal memo on setting up a private VSTS feed  on a Mac with Visual Studio 2017 for Mac OS.



  1.  Create a new Personal Access Token (PAT). You can follow the documentation here [1] to set this up
    • Important: Make sure to set Accounts field to "All accessible (<your account>) accounts
  2.  Go to the feed details page and  click the "Connect to Feed" button. It will give you a NuGet add source command.
  3.  Load a solution with a private feed
    • Visual Studio should automatically prompt you for credentials
    • Provide the username and the PAT as the password
    • If Visual Studio does not prompt you for credentials navigate to Tools > Add Custom Tool > NuGet > Sources and enter your username and PAT (as the password)

Notes

  • The credentials are not stored under the apiKeys configuration element but rather it is stored under packageSourceCredentials as an encrypted password

References