Vaultwarden a Self Hosted Password Vault

Introduction When Lastpass first came on the scene I jumped on it because of how easy it makes syncing passwords between devices. Previously, I was using a local password manager that was only on my computer. Thankfully, mobile logins weren’t nearly as necessary for daily life back then. However, I still needed my computer to log into anything on my phone. Over the years, Lastpass started having security incidents. This isn’t surprising with how big it became....

March 16, 2023 · John

String List in C

Introduction Currently we have a generic list container which uses void pointers to allow anything to be stored. Previously, we created a type safe string hashtable wrapping the generic hashtable. We want to do the same thing for our list and so now we’re going to create a type safe string list wrapping our generic list. Design Unlike the string hashtable we want to extend the our string list to have some string specific functionality....

April 22, 2020 · John

Generic List in C

Introduction Lists (dynamic arrays) are yet another super useful data structure that C just doesn’t have. C arrays are great for when you can get away with a fixed size but not so fun if you need to dynamically expand because you don’t know quite how many elements you’ll need. You could use a series of reallocs and memmoves but that’s going to get old really fast. It’s also error prone and not obvious when growth is needed....

April 9, 2020 · John

String Hashtable in C

Introduction We have this amazing generic hashtable and we can put pretty much anything we want into it, but it has a few flaws. It uses void pointers and has a pretty verbose setup with that callback struct. If you’re using the same types over and over again you’ll have a lot of redundant code. There is also a much more pressing issue of void pointers. They remove type safely. It would be really bad if you passed the wrong type to a hashtable meant for another....

March 28, 2020 · John

Generic Hashtable in C

Introduction So, C doesn’t have a native hashtable object but that’s not a problem because we can use one one someone else wrote. Lack of a robust standard library is probably the biggest impoundments of working with C. It’s a real shame C doesn’t natively support hashtables because they are so versatile. You should keep this saying in mind, “when in doubt hash it out”. It works for programming and for life in general....

March 6, 2020 · John