I am working on code that will load the BSA files and game data (including loose files) exactly the same way as the game does it but I need some code to calculate the BSA file hashes.
There is code here
http://www.uesp.net/wiki/Tes4Mod:BSA_File_Format
but its in Python and I cant read Python. Does anyone have something in a language like C++ or can someone help me come up with a C++ version of the Python code?
Google BSAOpt by Ethatron. It's in C and C++.
In the future you might also be interested be interested in using libbsa, which is a library for reading and writing BSA files that I'm in the process of writing, using code from BSAOpt. It's not released yet though.