-
@sameh.hady thanks for the help. I will surely give that a try over the weekend and respond back with my results.
In the mean time, do you happen to know if I will need to instantiate the node.js ws server again even though the uncaughtException is captured and node.js does NOT crash?
-
@sameh.hady thanks for writing a ws module :) this will come in handy with node-webkit. Someone can create a GUI and a ws server in node-webkit and you'll have a nice "dashboard" interface that can update in real time :)
Anyways, in the past I created a node.js ws server, but it would crash out of no where. Is there anything that anyone can do to catch the exception and keep the node.js ws server from crashing or detect a crash and re-initialize the node.js ws server?
-
Hi and welcome to the Espruino side of things :) the Espruino is most definitely well suited for your project. For wifi have a look at:http://www.espruino.com/ESP8266
And for gps have a look at: http://www.espruino.com/GPS -
@allObjects no, I haven't seen that and thanks for the link. I will see how well my 3d printer can print out the parts needed to create the pump.
-
@RandyHarmon I'm using atlas-scientific EZO sensors. Ive tried sparkyswidgets sensors before but the breakout boards are quite large for my project so I settled for atlas. However, atlas sensors are closed sourced which is a bummer, but they seem to work quite well.
As far as the paristaltic pump, I havent gotten that far.
I take it that you are working on a project similar to mine? Maybe you have any sensor suggestions?
-
@Gordon I am reading ph and ec values which will change but not drastically when the plants feed. I'm reading the values to know when to add nutrients and fix the ph value either by hand or by using a Peristaltic pump. From experience, tomatoes, peppers and cucumbers are heavy feeders so I normally see the values change more often.
I will take your advise and read every 10 minutes and power down. 10 minutes is well with an acceptable time frame to take all readings and also to save on power.
-
I can successfully read ph, ec and temp sensor readings. Ph and EC are attached to i2c and the temp is attached to analog. I'm using the waveform to gather the analog readings and repeat is set to false so I can manually call the waveform function. Both ph and ec need at least a 3 second pause each in order to get the reading from the sensors.
I have a boolean named getSensorValues which will be set to true to start the process and remain in that state until all the readings are successfully gathered. The reason for that is, so I can control the readings using a timer, where the timer will continuously loop and trigger a function to start the gathering process if the boolean is set to true and not when it's set to false. And I'm assuming I will need to set the boolean to false during the readings so it won't start another process.
I will be sending all the values compiled into a JSON string via wifi to a sever and then wait for an "OK" response from the server.
I hope that makes sense :/
Anyways, I'm trying to find the duration between sensor readings "sweet spot" where the Pico won't call the individual readings to fast or too slow, sorta like the goldilocks principle.
So far I need to wait at least 6 seconds(maybe 7 seconds to be safe) for the ec and ph to respond with their readings. I'm not sure about the temp reading using waveform and the wifi duration.
What do you guys recommend for the durations between readings?
Also does anyone recommend a better approach to what I'm attempting to do?
-
@the1laz Ya, I'm noticing the popularity with using Eaglecad and I did notice the plethora of libraries and open source schematics available.
Eagle cad is bit of a learning curve for me. I still can't figure out how to add two 3 position headers at 17.78 MM apart.
-
@the1laz I downloaded and installed Altium Circuit Maker and your right, it supports eagle files. The downside to Altium Circuit Maker is it's community driven and requires internet access to work on your project :-/
@Jorgen I downloaded and installed KiCad, but I have yet to figure out how to install https://github.com/DanChianucci/Eagle2Kicad apparently I don't have Tkinter installed for python. I'm still stuck on the installation process of Tkinter.
@Gordon I wasn't aware Eagle was free for personal use and was under the impression due to the license changes that there was a small fee for the "light version". However, I was wrong and installed eagle.
Eagle Cad seems to be the easiest approach, for me atleast :-)
-
-
@allObjects which makes sense as to why microprocessors have limited ram and why someone that requires lots of ram should use a raspberry pie.
@allObjects you mentioned serial ram, MRAM seems promising.
In regards to loosing IO, are there such chips out there to convert an IO to I2c? I.E serial to i2c and etc....? -
@allObjects interesting chip. I really like the hardware accelerated crypto feature.
In my opinion, I believe the espruino speed is good where it's at, however, I never had a project that needed lots of speed.
What I wish is for LOTS of ram, maybe 128mb :). Some of you might recommend to use the raspberry pi, but I don't like the boot up time required for the raspberry pi.
A good reason for lots of ram, but not a popular one is for a js crypto library where you can load as a js module. That way the user wouldn't have to mess with setting up a compiling environment.
Maybe the next version of the espruino should stay with STM32F series chips, but choose a processor that allows the use of external volatile memory (maybe 128mb?) that can be added to the circuitry. Does a lower end STMprocessor that supports that feature even exist? I know there is a thread pertaining to using an eeprom, but I think that's different than what I'm referring too.
-
@DrAzzy thanks for the recommendation I'm going to order a unleaded version also.
This oven is taking me forever to build :/ God only knows how long the RepRap Prusa i3 3D printer will take for me to put together once It actually arrives. I'm really not that mechanically inclined LOL.
-
I built a hobbyist re-flow oven using the ControlLeo2(whizoo.com) and the toaster oven that they recommended to use. What solder paste do you guys recommend to use?
Also, does anyone have a good technique on how to re-flow a two sided PCB?
-
@allObjects Thanks. I couldn't sleep last night until I figured all this out. Plus I am going camping for a week and a half. Which will give me a decent break from my project; allowing me to approach my project again with a clearer mind.
@Gordon I'm all coded out :/ I have yet to try your example, but when I do, I'm sure I will respond back with more questions ;-)
-
@Gordon @Stevie I finally got this to work :-) I needed to work with the buffer[] array. Now, all I need to figure out is create a random IV and MAC the encrypted data.
How do I work with function arguments? I would like to pass in the Key, IV, hashkey and what every data needs to be encrypted. I want to execute Crypto.aescbc(key, iv, hashKey, data);
-
https://github.com/kokke/tiny-AES128-C is the library I am using. The test.c compiles correctly. I am just trying to implement my own "stuff" to encrypt and decrypt as a test instead of using the test data.
I uploaded the test.c file
Eventually, I would like to create a AESCBC library into Espruino, but since i'm new to programming in general I seem to be hitting a brick wall :/ Maybe one day I will get this to work. Or maybe someone who is ambitious enough can get this to work ;-)
-
@Gordon yup, AES128_CBC_Encrypt_Buffer is fiddling with the data inside of in, errr. And I wonder why that is.....
{"PH":["Result",5.5],"EC":["Result",700],"ResTemp":["Result",137.5]}
int:
123,34,80,72,34,58,91,34,82,101,115,117,108,116,34,44,53,46,53,93,44,34,69,67,34,58,91,34,82,101,115,117,108,116,34,44,55,48,48,93,44,34,82,101,115,84,101,109,112,34,58,91,34,82,101,115,117,108,116,34,44,49,51,55,46,53,93,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
int as hex:
7b,22,50,48,22,3a,5b,22,52,65,73,75,6c,74,22,2c,35,2e,35,5d,2c,22,45,43,22,3a,5b,22,52,65,73,75,6c,74,22,2c,37,30,30,5d,2c,22,52,65,73,54,65,6d,70,22,3a,5b,22,52,65,73,75,6c,74,22,2c,31,33,37,2e,35,5d,7d,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
int as char:
{,",P,H,",:,[,",R,e,s,u,l,t,",,,5,.,5,],,,",E,C,",:,[,",R,e,s,u,l,t,",,,7,0,0,],,,",R,e,s,T,e,m,p,",:,[,",R,e,s,u,l,t,",,,1,3,7,.,5,],},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,And I don't have the slightest idea why AES_128_CBC_encrypt_Buffer is doing that.....
-
@Stevie I edited my source code so many times while trying to figure all this out. I attached the complete source code of the library
I also thought the same about the +1. I don't think I am editing the array. All I am doing is iterating through the array to output whats in the array(usually hex to the ascii equivalent) and the first character is { which is correct.
-
casting an int doesn't change anything. I'm still receiving the same output
This is my complete code of jswrap_crypto.c:
[#include](https://forum.espruino.com/search/?q=%23include) <stdio.h> [#include](https://forum.espruino.com/search/?q=%23include) <string.h> [#include](https://forum.espruino.com/search/?q=%23include) <stdint.h> // Enable both ECB and CBC mode. Note this can be done before including aes.h or at compile-time. // E.g. with GCC by using the -D flag: gcc -c aes.c -DCBC=0 -DECB=1 [#define](https://forum.espruino.com/search/?q=%23define) CBC 1 [#define](https://forum.espruino.com/search/?q=%23define) ECB 0 //ECB is not a very secure cipher to use. [#include](https://forum.espruino.com/search/?q=%23include) "aes.h" [#include](https://forum.espruino.com/search/?q=%23include) "jswrap_crypto.h" [#include](https://forum.espruino.com/search/?q=%23include) "jsinteractive.h" static void phex(uint8_t* str); static void test_encrypt_cbc(void); static void test_decrypt_cbc(void); // Let's define the JavaScript class that will contain our `aescbc()` method. We'll call it `Hello` /*JSON{ "type" : "class", "class" : "Crypto" }*/ // Now, we define the `jswrap_crypto_aescbc` to be a `staticmethod` on the `Hello` class /*JSON{ "type" : "staticmethod", "class" : "Crypto", "name" : "aescbc", "generate" : "jswrap_crypto_aescbc" }*/ void jswrap_crypto_aescbc(void) { test_encrypt_cbc(); //test_decrypt_cbc(); } // prints string as hex static void phex(uint8_t* str) { unsigned char i; for(i = 0; i < 16; ++i) jsiConsolePrint(str[i]); jsiConsolePrint("\n"); } static void test_decrypt_cbc(void) { // Example "simulating" a smaller buffer... uint8_t key[] = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }; uint8_t iv[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }; uint8_t in[128] = { 0x96, 0x25, 0xC9, 0x62, 0x8B, 0x82, 0x0D, 0xCB, 0x08, 0x6C, 0x51, 0x26, 0xF6, 0x52, 0x80, 0x79, 0xE6, 0xBF, 0x39, 0xFA, 0x47, 0x95, 0x14, 0x4B, 0x98, 0xAF, 0xBF, 0xA7, 0x8C, 0x5A, 0x44, 0x20, 0xD4, 0x14, 0x86, 0x9F, 0xFF, 0x7E, 0xC2, 0x02, 0xF5, 0xA4, 0x34, 0xEE, 0xF3, 0xF5, 0xD1, 0x1D, 0xE0, 0xE5, 0x78, 0xCD, 0xFA, 0x30, 0xBE, 0x59, 0x34, 0x9E, 0xDA, 0xE0, 0x56, 0xC1, 0x06, 0xA8, 0x9F, 0xEA, 0x9B, 0xBB, 0x25, 0x54, 0x37, 0xCF, 0x33, 0x61, 0x5F, 0xC5, 0x77, 0x7B, 0xC7, 0xC1, 0x2D, 0x4A, 0x67, 0xCA, 0xFA, 0x06, 0x60, 0x02, 0x23, 0x83, 0x44, 0x09, 0x75, 0xFC, 0xB2, 0xB0, 0xC2, 0xF6, 0x0B, 0x1A, 0x45, 0x5C, 0x50, 0xEB, 0x64, 0x97, 0xA9, 0x81, 0xE9, 0xF9, 0x8C, 0xB6, 0x9E, 0x57, 0xD9, 0x48, 0xBC, 0x30, 0x5E, 0x17, 0xD3, 0x5A, 0xE4, 0x9D, 0x1E, 0xFE, 0x5D, 0x04 }; uint8_t out[128] = { 0x96, 0x25, 0xC9, 0x62, 0x8B, 0x82, 0x0D, 0xCB, 0x08, 0x6C, 0x51, 0x26, 0xF6, 0x52, 0x80, 0x79, 0xE6, 0xBF, 0x39, 0xFA, 0x47, 0x95, 0x14, 0x4B, 0x98, 0xAF, 0xBF, 0xA7, 0x8C, 0x5A, 0x44, 0x20, 0xD4, 0x14, 0x86, 0x9F, 0xFF, 0x7E, 0xC2, 0x02, 0xF5, 0xA4, 0x34, 0xEE, 0xF3, 0xF5, 0xD1, 0x1D, 0xE0, 0xE5, 0x78, 0xCD, 0xFA, 0x30, 0xBE, 0x59, 0x34, 0x9E, 0xDA, 0xE0, 0x56, 0xC1, 0x06, 0xA8, 0x9F, 0xEA, 0x9B, 0xBB, 0x25, 0x54, 0x37, 0xCF, 0x33, 0x61, 0x5F, 0xC5, 0x77, 0x7B, 0xC7, 0xC1, 0x2D, 0x4A, 0x67, 0xCA, 0xFA, 0x06, 0x60, 0x02, 0x23, 0x83, 0x44, 0x09, 0x75, 0xFC, 0xB2, 0xB0, 0xC2, 0xF6, 0x0B, 0x1A, 0x45, 0x5C, 0x50, 0xEB, 0x64, 0x97, 0xA9, 0x81, 0xE9, 0xF9, 0x8C, 0xB6, 0x9E, 0x57, 0xD9, 0x48, 0xBC, 0x30, 0x5E, 0x17, 0xD3, 0x5A, 0xE4, 0x9D, 0x1E, 0xFE, 0x5D, 0x04 }; uint8_t buffer[128]; AES128_CBC_decrypt_buffer(buffer, in, 128, key, iv); //AES128_CBC_decrypt_buffer(buffer+16, in+16, 16, 0, 0); //AES128_CBC_decrypt_buffer(buffer+32, in+32, 16, 0, 0); //AES128_CBC_decrypt_buffer(buffer+48, in+48, 16, 0, 0); //AES128_CBC_decrypt_buffer(buffer+64, in+64, 16, 0, 0); jsiConsolePrint("CBC decrypt: "); if(0 == strncmp((char*) out, (char*) buffer, 128)) { jsiConsolePrint("SUCCESS!\n"); } else { jsiConsolePrint("FAILURE!\n"); } } static void test_encrypt_cbc(void) { uint8_t key[] = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }; uint8_t iv[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }; uint8_t in[128] = { 0x7B, 0x22, 0x50, 0x48, 0x22, 0x3A, 0x5B, 0x22, 0x52, 0x65, 0x73, 0x75, 0x6C, 0x74, 0x22, 0x2C, 0x35, 0x2E, 0x35, 0x5D, 0x2C, 0x22, 0x45, 0x43, 0x22, 0x3A, 0x5B, 0x22, 0x52, 0x65, 0x73, 0x75, 0x6C, 0x74, 0x22, 0x2C, 0x37, 0x30, 0x30, 0x5D, 0x2C, 0x22, 0x52, 0x65, 0x73, 0x54, 0x65, 0x6D, 0x70, 0x22, 0x3A, 0x5B, 0x22, 0x52, 0x65, 0x73, 0x75, 0x6C, 0x74, 0x22, 0x2C, 0x31, 0x33, 0x37, 0x2E, 0x35, 0x5D, 0x7D, 0x30 }; uint8_t buffer[128]; AES128_CBC_encrypt_buffer(buffer, in, 128, key, iv); int i; //Just a test which outputs the correct ascii char buf[4]; buf[0] = 0X7B; buf[1] = 0x22; buf[2] = 0x50; buf[3] = 0; jsiConsolePrint(in); jsiConsolePrint("\n int: "); for(i = 0; i < 128; ++i) jsiConsolePrintf("%d,", (int)in[i]); jsiConsolePrintf("\n"); jsiConsolePrint("\n int as hex: "); for(i = 0; i < 128; ++i) jsiConsolePrintf("%x,", (int)in[i]); jsiConsolePrintf("\n"); /*jsiConsolePrint("\n int as string: "); for(i = 0; i < 128; ++i) jsiConsolePrintf("%s,", in[i]); jsiConsolePrintf("\n");*/ jsiConsolePrint("\n int as char: "); for(i = 0; i < 128; ++i) jsiConsolePrintf("%c,", (int)in[i]); jsiConsolePrintf("\n"); int n = sizeof(in); jsiConsolePrint(n); jsiConsolePrint("CBC encrypt: "); /*if(0 == strncmp((char*) out, (char*) buffer, 128)) { jsiConsolePrint("SUCCESS!\n"); } else { jsiConsolePrint("FAILURE!\n"); }*/ }
-
uint8_t in[128] = { 0x7B, 0x22, 0x50, 0x48, 0x22, 0x3A, 0x5B, 0x22, 0x52, 0x65, 0x73, 0x75, 0x6C, 0x74, 0x22, 0x2C, 0x35, 0x2E, 0x35, 0x5D, 0x2C, 0x22, 0x45, 0x43, 0x22, 0x3A, 0x5B, 0x22, 0x52, 0x65, 0x73, 0x75, 0x6C, 0x74, 0x22, 0x2C, 0x37, 0x30, 0x30, 0x5D, 0x2C, 0x22, 0x52, 0x65, 0x73, 0x54, 0x65, 0x6D, 0x70, 0x22, 0x3A, 0x5B, 0x22, 0x52, 0x65, 0x73, 0x75, 0x6C, 0x74, 0x22, 0x2C, 0x31, 0x33, 0x37, 0x2E, 0x35, 0x5D, 0x7D }; jsiConsolePrint("\n int: "); for(i = 0; i < 128; ++i) jsiConsolePrintf("%d,", in[i]); jsiConsolePrintf("\n"); jsiConsolePrint("\n as hex: "); for(i = 0; i < 128; ++i) jsiConsolePrintf("%x,", in[i]); jsiConsolePrintf("\n"); jsiConsolePrint("\n as string: "); for(i = 0; i < 128; ++i) jsiConsolePrintf("%s,", in[i]); jsiConsolePrintf("\n"); jsiConsolePrint("\n as char: "); for(i = 0; i < 128; ++i) jsiConsolePrintf("%c,", in[i]); jsiConsolePrintf("\n");
output:
int:
123,35,82,75,38,63,93,37,90,108,121,126,96,121,44,35,78,195,192,206,161,6,193,159,231,158,226,59,181,37,61,141,111,97,247,132,126,142,86,56,172,92,17,73,79,66,41,211,97,176,235,108,38,156,243,61,207,206,186,222,1,250,166,113,184,220,198,15,154,97,79,210,150,107,198,10,235,131,134,21,231,112,183,50,100,147,164,100,233,211,42,58,163,71,225,236,176,146,103,250,186,141,42,68,41,122,14,13,121,204,22,151,117,104,183,133,135,191,184,132,72,67,74,170,236,83,242,47,
as hex:
7b,23,52,4b,26,3f,5d,25,5a,6c,79,7e,60,79,2c,23,4e,c3,c0,ce,a1,6,c1,9f,e7,9e,e2,3b,b5,25,3d,8d,6f,61,f7,84,7e,8e,56,38,ac,5c,11,49,4f,42,29,d3,61,b0,eb,6c,26,9c,f3,3d,cf,ce,ba,de,1,fa,a6,71,b8,dc,c6,f,9a,61,4f,d2,96,6b,c6,a,eb,83,86,15,e7,70,b7,32,64,93,a4,64,e9,d3,2a,3a,a3,47,e1,ec,b0,92,67,fa,ba,8d,2a,44,29,7a,e,d,79,cc,16,97,75,68,b7,85,87,bf,b8,84,48,43,4a,aa,ec,53,f2,2f,
as string:
,,,,,,%,,,M%,%,,M%,%,M%,,,,M%,,%,,%,,,,,,%,,,,,%,,M%,,,,M%,M%,M%,%,%,,,,,%,M%,,M%,,M%,,,,,,,
%,,,%,M%,,,,,%,,,,,,,,,,%,,M%,,,M%,,M%,M%,,,,,,,%,,M%,,,,,,,M%,,,,%,%,M%,,,%,M%,,%,,,M%,M%,M%,,,,,,,,
as char:
{,#,R,K,&,?,],%,Z,l,y,~,`,y,,,#,N,Ã,À,Î,¡,,Á,,ç,,â,;,µ,%,=,,o,a,÷,,~,,V,8,¬,\,,I,O,B,),Ó,a,°,ë,l,&,,ó,=,Ï,Î,º,Þ,,ú,¦,q,¸,Ü,Æ,,,a,O,Ò,,k,Æ,
,y,Ì,,,u,h,·, ,,¿,¸,,H,C,J,ª,ì,S,ò,/,°,,g,ú,º,,*,D,),z,,The array of hex should be the equivalence of ascii: {"PH":["Result",5.5],"EC":["Result",700],"ResTemp":["Result",137.5]}
However I am still not receiving the correct ascii.
-
@Stevie i'm still getting the same issue, but now I am receiving
MMM MMMMMMMMMMMMMMMUMMMMFull code:
[#include](https://forum.espruino.com/search/?q=%23include) <stdio.h> [#include](https://forum.espruino.com/search/?q=%23include) <string.h> [#include](https://forum.espruino.com/search/?q=%23include) <stdint.h> // Enable both ECB and CBC mode. Note this can be done before including aes.h or at compile-time. // E.g. with GCC by using the -D flag: gcc -c aes.c -DCBC=0 -DECB=1 [#define](https://forum.espruino.com/search/?q=%23define) CBC 1 [#define](https://forum.espruino.com/search/?q=%23define) ECB 0 //ECB is not a very secure cipher to use. [#include](https://forum.espruino.com/search/?q=%23include) "aes.h" [#include](https://forum.espruino.com/search/?q=%23include) "jswrap_crypto.h" [#include](https://forum.espruino.com/search/?q=%23include) "jsinteractive.h" static void test_encrypt_cbc(void); static void test_encrypt_cbc(void) { uint8_t key[] = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }; uint8_t iv[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }; uint8_t in[128] = { 0x7b, 0x22, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0x3a, 0x5b, 0x31, 0x2c, 0x32, 0x2c, 0x33, 0x5d, 0x2c, 0x22, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x22, 0x3a, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x22, 0x6e, 0x75, 0x6c, 0x6c, 0x22, 0x3a, 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x22, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x3a, 0x31, 0x32, 0x33, 0x2c, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x61, 0x22, 0x3a, 0x22, 0x62, 0x22, 0x2c, 0x22, 0x63, 0x22, 0x3a, 0x22, 0x64, 0x22, 0x2c, 0x22, 0x65, 0x22, 0x3a, 0x22, 0x66, 0x22, 0x7d, 0x2c, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x3a, 0x22, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x22, 0x7d }; uint8_t buffer[128]; AES128_CBC_encrypt_buffer(buffer, in, 128, key, iv); int i; for(i = 0; i < 128; ++i) jsiConsolePrintf(in[i]); jsiConsolePrintf("\n"); jsiConsolePrint("CBC encrypt: "); }
-
@sameh.hady nodejs ws server has been up for about 2 days without crashing :)