Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm developing some experimental program that requires hashing strings.
I tried all the source code I could find on the internet but none of it seemed to work without any dependencies, can you please link the source to a cryptographic hashing function that has no dependencies, i.e. something that I can just copy/paste into my code and it would work?
PS I prefer a secure hashing function, but MD5 would be fine for now.
You may want to check Simple MD5 implementation with no dependences.
Also check these proposals: hash function for string.
It is worth to mention that there are other open source implementations like:
Basic implementations of standard cryptography algorithms, like AES and SHA-1 and sphlib an open source library which provides optimized and portable implementations of many hash functions.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I want to generate guids to name a set of different files. The main restriction I am having is the fact that I need to implement this in an embedded microcontroller with an RTOS.
The main UUID/GUID libraries i've found are linux/windows based, but don't work for my case. Is there a simple, lightweight implementation available I could use? or I would need to generate my own GUID generator?
Edit:
The MCU does have a random number generator and a real time clock.
I solved the issue using GUID. Initially I thought I could use this only on linux based systems but turns out it can also be used for the MCU and the implementation is quite light weight.
The procedure to generate the GUID comes from this website which also provides the sourcecode of the UUID.c library.
Solution provided by #Kamil Cuk .
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Can you give me a simplest method to check the Internet availability using a C program in Linux?
I have implemented a program to run the system command 'traceroute' in C. Before this I have to check whether the Internet connection is available or not. So can you suggest a method?
Short answer: no. Neither C nor C++ has direct knowledge of networking, or any built-in networking functions.
Depending on what 3rd-party libraries you are using, there may be something you can use, but that depends on the library, it isn't directly part of C.
I can imagine there are libraries out there that might try to ping some internal/external address, perform a name lookup, etc. But if you're on an isolated network, not having the ability to ping, lookup, or cross a firewall to get to a certain location may be perfectly valid, and doesn't indicate a networking problem.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a testsuite for the C Standard Library (mainly for the algorithms not contacting the "outer world", so strcpy(), memcmp(), itoa() & likes).
I tried downloading the GCC sources, but they're very large and I have trouble finding anything I could reuse in there...
(To be clear, the question is meant about the ANSI C Standard Library, not POSIX or else. Also, I'd like for the tests to be rather portable.)
The public domain C library has quite simple test cases, which are embedded in each source code file. For example: memcpy, strtol
Newlib has test cases organized as a test suite. They are more complex, but not nearly all functions are covered: memcpy
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
There are several C libraries available for parsing JSON, that will compile on Linux. Which library would you recommend?
Just to close the loop:
For the project in question, we ended up going with cJSON. We chose this one from the list of C libraries linked from json.org. Per the homepage, cJSON is:
An ultra-lightweight, portable, single-file, simple-as-can-be ANSI-C compliant JSON parser, under MIT license.
This happened to be a good fit for the particular project at hand, and the library worked out fine.
I've seen YAJL used with MGTwitterEngine (Mac/Cocoa), so I assume it is ok.
I haven't done much with it apart from compiling it and pointing MGTwitterEngine on Mac to its library/header files.
Check out the list at json.org. There are several C libraries for JSON.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm looking for a good collection of libraries for ANSI-C, stuff for handling vectors, hash maps, binary tress, string processing, etc.
Try glib? It's used by GTK+, but it can also be used on other platforms. You can also try Apache APR, which is used by the Apache web server and some of their other C components, or NSPR, which is used by Mozilla projects in C.
gnu's glib collection. furthermore, it's portable for many platforms.
You might also find this question useful:
Container Class / Library for C
As well, this book might be interesting:
Mastering Algorithms with C
The full source code is on the CD and it has code for most of those data structures and algorithms.
check also gnulib's data structures. This library also provides many other features as well as portable layer to ANSI/non-ANSI compilers and POSIX/non-POSIX systems.
checkout http://www.invincibleideas.com/library.asp
GLUT OpenGL I can recommend for very flexible C (graphics) development