Triple DES algorithm in C? - c

Does anyone have code snippet for Triple DES algorithm in C ?
Thanks

OpenSSL is written in C and provides a 3DES algorithm. It may not be as simple as some of the other suggestions, but it may be worth checking out.

Check out the Crypto++ library, they implement tons of algorithms including DES.

libtomcrypt is a comprehensive crypto lib written in C, with a 3DES implementation.

Here's a simple implementation in C & C++. Possibly simpler to use than libtomcrypt.
http://www.codeguru.com/cpp/misc/misc/cryptoapi/article.php/c8195

Related

How to write GMM (Gaussian Mixture Model) in C?

How can I write GMM (Gaussian Mixture Model) in C. There are some implementations in Matlab but I am looking for some documentation about it and example code in C not in C++.
OpenCV has an implementation of a GMM that is used for their GrabCut implementation.
You can find it for example here.
edit: I just noticed you were looking for an implementation in C. The OpenCV implementation is using C++. But maybe you can use it as a starting point.
Here you can find an implementation in C:
https://engineering.purdue.edu/~bouman/software/cluster/
How about the mixture model in Apophenia?
There is a GMM implementation available in vlfeat, a C library for computer vision. https://www.vlfeat.org/api/gmm.html

Implementing a C preprocessor

Much has been written over the years on implementing parsers, but the C preprocessor is not quite the same as any of the stages of a typical parser, and implementation thereof doubtless has its share of particular pitfalls to watch out for. Does anyone know of anything written on the topic of implementing a C preprocessor?
Hartmut Kaiser, the author of Boost Wave, wrote a nice article on CodeProject http://www.codeproject.com/KB/recipes/wave_preprocessor.aspx about the Boost Wave project. You can use Boost Wave to make your own C preprocessor with custom extensions.
I found a useful discussion in the document mcpp-summary at http://mcpp.sourceforge.net/
I've based mine on the gnu internals

L1 constrained Regression in C

I need Lasso/L1 constrained Regression Library in C. AFAIK, NAG does not support it. R has a package to do it but I need to do it in C. Any idea?
You could embed R in your application.
Coding l1 stuff yourself should not be too bad. Both ftp://ftp.math.ucla.edu/pub/camreport/cam08-37.pdf and ftp://ftp.math.ucla.edu/pub/camreport/cam08-29.pdf are easy to implement.
If you can use C++ this library might already have what you want:
http://www.di.ens.fr/willow/SPAMS/index.html
Thanks. I wrote my own C function and it worked well.

Is there a tool for translating code from C to Smalltalk?

friends, I have a piece of code which can perform simple add, subtraction, multiplication, division, and formula with brackets.
Is there some kind of conversion tool for translating code from C to Smalltalk?
Or any other relatively easy way to achieve this?
Thanks in advance.
This should be trivial to write with PetitParser
There is an implementation of SWIG for Smalltalk. (SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages).

Recursive Descent Parser for C

I'm looking for a parser for C. Here is what I need:
Written in C (not C++).
Handwritten (not generated).
BSD or similarly permissive license.
Capable of nontrivially parsing itself (can be a subset of C).
It can be part of a project as long as it's decoupled so that I can pull out the parser.
Is there an existing parser that fulfills these requirements?
If you don't need C99, then lcc is a slam dunk:
It is documented in a very clear, well-written book.
Techniques used for recursive-descent parsing of operators with precedence are well documented in an article and technical report by Dave Hanson.
Clear, handwritten ANSI C code.
One potential downside is that the lcc parser does not build an abstract-syntax treeā€”it goes straight from parsing to intermediate code.
If you must have C99 then I think tinycc (tcc) is your best bet.
How about Sparse?
You could try TCC. It's licensed under the Lesser GPL.
It seems that nwcc sufficiently agrees with your requirements.
Good c compiler is present at this location. Simple and accessible.
https://github.com/rui314/8cc
GCC has one in gcc/c-parser.c.
Check elsa, it uses the Generalized LR algorithm.
Its main use is for C++, but it also parses C code.
Check on its page, on the section called "How much C can Elsa parse?" which says it can parse most C programs, including the Linux kernel.
It's released under a BSD license.
Here is a recursive descent parser I ported to C:
http://www.gabotronics.com/resources/recursive-descent-parser.htm

Resources