Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hash.c, scogem.c, simpletls.c, smallxrm.c #269

Open
zzo38 opened this issue Jan 24, 2024 · 0 comments
Open

hash.c, scogem.c, simpletls.c, smallxrm.c #269

zzo38 opened this issue Jan 24, 2024 · 0 comments

Comments

@zzo38
Copy link

zzo38 commented Jan 24, 2024

I wrote some C libraries with two files (each with one .c file and one .h file). All of them are public domain. I don't know which ones are usable from C++, and I don't know if they are usable on platforms other than GNU/Linux on PC (since I have not tried). I expect that they will probably work on 32-bit systems as well as 64-bits (although, for most of them, I have only tried 64-bits). Most have no other dependencies, except as otherwise specified in the descriptions below.

  • hash.c - hash.h - Calculate cryptographic hashes, using the standard C stream interface (fwrite, etc). Some code comes from parts of SQLite (which is also public domain). Currently only a few algorithms are implemented (SHA-1, SHA-3, MD5), but more can be added in future.

  • scogem.c - scogem.h - Can parse URLs (many schemes are implemented), including converting relative URLs into absolute, username/password, default port numbers, and also percent-encoding (both encoding and decoding is possible). Can also parse MIME type and ULFI strings. (It cannot actually upload and download files; that is implemented in a separate file. Originally it was intended to put into this file too, but now it isn't.)

  • simpletls.c - simpletls.h - Exposes one function to create a socket and connect to a remote server with TLS. It can then be used like an ordinary socket. Client certificates are not implemented yet (although it is intended to be done in future; unfortunately I don't know how, at this time). Requires OpenSSL (although someone else might be able to write a program with the same interface that does not use OpenSSL).

  • smallxrm.c - smallxrm.h - Implementation of X resource manager. Can be used even without X window system. Also has a function xrm_init_quarks that X window system does not have, which can be used to assign constant numbers for each resource name for more efficiency (rather than having to use variables, like you do with X windows). Anonymous quarks are possible (like X windows); however, it lacks the possibility of non-string-type resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant