![]() ![]() Specifically, converting characters from decimal/hex/binary to whichever form is needed. The one thing I learned was all of the different conversion methods available via. My searching proved more fruitful than I intended. Figuring out how to make that 8 bit binary code into a string took a bit, and required multiple conversions of the data. I started out with the idea I could use the get-random to randomly generate a 0 or 1 and then loop through that 8 times to generate an 8 bit binary code that I could then convert to a string. I figured it couldn’t be hard to write a simple function to generate a random string it really wasn’t. However, it IS bad to always use the same IV. It’s generally accepted that knowing the IV doesn’t make it less secure so hard coding it to the resultant script isn’t a bad thing. I needed a string, so that I could randomly generate the IV that goes with each script. PowerShell has a native cmdlet to get a random number but not one for a string. The other thing I needed to work on, and solved, was generating a random string. I’ve had the concept in my head and most of the proof it could be done, I just have to work on one very irritating issue with arrays. I started working again on a scripting promise I made a while ago about sharing the ability to run an encrypted script without having to write the unencrypted contents to disk, thus making the contents of your script more secure. It’s odd to learn something yet periodically “realize” it all over again when life has need of that lesson. I learned something new last Friday as well as had another idea driven home again. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |