Refactor backend selection.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Refactor transaction types into a list.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Support SHA-384 and SHA-512.

Turn the SHA256Transaction store into a HashTransactionStore and support
SHA-384 and SHA-512, which provide better performance on 64-bit systems.
Don't support SHA-224 since it is weaker and is only useful where the hash
would be truncated anyway.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Generate testcases on the fly.

Use hashlib to generate the testcases instead of relying on hard-coded
values.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Implement support for autodetecting hashes.

The appropriate hash to use for validating the data is automatically
detected, and if no hash type is specified, use SHA-512 on 64-bit systems
and SHA-256 on 32-bit systems, as this provides the best performance.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Switch newfol to use "hash" type instead of "sha256".

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Merge branch 'master' into peter