Tag Archives: c++

How to send and receive answers to a web api using ASP.NET C#

Questions: I have to call a web API in XML that use EPP (Extensible Provisioning Protocol) and returns a XML as response. I also need to use a certificate to call it, but the received response is null. There is only a sample code in PHP that works. eppClient.php <?php require_once ‘config.php’; require_once ‘eppFunctions.php’; //Get… Read More »

C# WebClient can not upload large files

Questions: I have a large file (500MB) and my application can not send it to my webpage. public static void UploadFile(string url, string fileName) { WebClient client = new WebClient(); byte[] responseBinary = client.UploadFile(url, fileName); string response = Encoding.UTF8.GetString(responseBinary); MessageBox.Show(response); } It sends to a php file. I tried a check var_dump($_FILES); var_dump($_REQUEST); but both… Read More »

RSA Encrypting in c# and Decrypting data in java

Questions: I’m trying to encrypt data in my C# client with public RSA key from the Java server. To do this I generated KeyPair in Java KeyPairGenerator.java KeyPairGenerator kpg = KeyPairGenerator.getInstance(“RSA”); kpg.initialize(2048); KeyPair kp = kpg.generateKeyPair(); Key pub = kp.getPublic(); Key pvt = kp.getPrivate(); String outFile = “rsa_key”; FileOutputStream outPvt = new FileOutputStream(outFile + “.key”);… Read More »

Unique hash code of a string C#

Questions: I am supposed to implement bloom filter using C# and I am trying to follow : https://gist.github.com/richardkundl/8300092 but it has to be compatible with other platforms like iOS and android. So I cannot use string.GetHashCode as one of the hash functions, since iOS OR Android will add items to the bloom filter and on… Read More »

Unity c# android audio latency

Questions: I have been battling this audio latency when using built in unity stuff. I have been trying to get it to work natively following this post (https://forum.unity.com/threads/android-sound-latency-fix.319943/). I got the audio to work in unity but not on android. I have the sound files in the in both the Resources/Sounds and StreamingAssets/Resources/Sounds folders. Both… Read More »

How to decode messages in Websocket C#

Questions: I’m trying to make a Websocket server that communicates with another JavaScript client (ALL LOCALLY). I figured out how the client connects with the server, and the handshaking stuff, but the part where I’m stuck at is the decoding of the messages. Whenever we send messages, the messages are encrypted. How do we ‘decrypt’… Read More »

C++ signal handler can't notify Java side

Questions: I have the following CPP code. What I want to do is when an error occurs in my native side, I will notify Java about the error. I used How can I catch SIGSEGV (segmentation fault) and get a stack trace under JNI on Android? as reference. static JavaVM* g_JVM = NULL; static jobject… Read More »

Access Serial Ports in Android from C/C++

Questions: I am completely lost on this. Hopefully someone can point me in the right direction. I am using: https://code.google.com/archive/p/android-serialport-api/ I have included the pre-built libserial_port.so in my project, along with SerialPort.h and SerialPort.c. Compiles with no warnings or errors. How do I now open the serial port? The .c/.h files provide two C functions,… Read More »