03-03-2016 01:44 PM
As an interesting/fun project, I'm trying to implement the bcrypt algorithm in some native G, without using any libraries (eg no DLL linkage, all native G code). All is going well for now, except for a minor roadblock I've run into. Part of the bcrypt algorithm involves initializing a state variable with a 4x256 array of hex codes derived from the digits of pi. In the C code, it looks like:
unsigned int BF_init_state = { { { // S row 1 initial state }, { // S row 2 initial state }, { // S row 3 initial state }, { // S row 4 initial state } }, { // P initial state goes here } };
I know this should be amenable to some kind of JSON import, or maybe directly via the Data Operations menu, but I'm not 100% certain on the best way to do it. Any ideas?
I've truncated the rows, so if you're interested in the full code, check out crypt_blowfish.c over on Github.
Solved! Go to Solution.
03-03-2016 03:09 PM
This will only do one row/column at a time, but I think this is what you are looking for.
03-03-2016 03:22 PM
Thanks, this is perfect. And so simple!