I mean, say you were writing professional grade software that would involve sensitive client information. (Take this in the context of me being an amateur programmer.)
Would you use hlib and hmac? Are they good enough to secure data? Or would you write something fancier by hand?
Edit: In context of those libraries containing more or less the best hashing algorithms in the world, I guess it’s silly to ask if you’d “write something fancier.”
What I’m really asking here is whether it’s enough on its own.
3
The pre-built library is almost certainly more secure than something you will write yourself. Writing security libraries like these is very difficult to do correctly without making any mistakes. The team of developers that made it probably have a lot more experience in this sort of thing than the average developer. Those libraries are also more “battle-tested” than something you’d write yourself. You should definitely use pre-build libraries instead of doing it yourself.
There’s a lot to keep in mind when trying to do something securely though. It’s possible to use the most secure tools and libraries, but combine them in a way that isn’t secure. This is more likely than the core libraries themselves being insecure. This is why you want to keep everything as simple as possible, even when using secure libraries and tools.