See crypto_pwbox.c for a description of the file format. There are tests for successful operation, but it still needs error-case tests.