This gives you a thin api on top of your TLS library digest functions which abstracts away whether you are using mbedtls apis or openssl ones. Using lws_genhash... apis the same code works either way and the dependencies on which TLS lib is hidden.