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.
Notes
- 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
- Go to the feed details page and click the "Connect to Feed" button. It will give you a NuGet add source command.
- 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
[1] Using Personal Access Tokens with VSTS, URL: https://docs.microsoft.com/en-us/vsts/accounts/use-personal-access-tokens-to-authenticate?view=vsts
[2] NuGet restore from a secured feed, URL: https://www.xavierdecoster.com/post/2012/12/12/nuget-package-restore-from-a-secured-feed.html
[3] NuGet API Keys, URL: https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file#apikeys
[4] NuGet config file, URL: https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file
[5] Add a private feed to your NuGet configuration (Windows) , URL: https://docs.microsoft.com/en-us/vsts/package/nuget/consume?view=vsts#windows-add-the-feed-to-your-nuget-configuration
[2] NuGet restore from a secured feed, URL: https://www.xavierdecoster.com/post/2012/12/12/nuget-package-restore-from-a-secured-feed.html
[3] NuGet API Keys, URL: https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file#apikeys
[4] NuGet config file, URL: https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file
[5] Add a private feed to your NuGet configuration (Windows) , URL: https://docs.microsoft.com/en-us/vsts/package/nuget/consume?view=vsts#windows-add-the-feed-to-your-nuget-configuration
Subscribe to:
Posts (Atom)