Commit Graph

3 Commits

Author SHA1 Message Date
David Sterba bbf703bfd3 btrfs-progs: crypto: call sha256 implementations by pointer
Change how sha256 implementation is selected. Instead of an if-else
check in the block processing function select the best version and assign
the function pointer. This is slightly faster.

At this point the selection is not implemented properly in
hash-speedtest so all results are from the fastest version. This will
be fixed once all algorithms are converted.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-02-28 20:10:58 +01:00
David Sterba fb98c1e9fc btrfs-progs: crypto: remove unused sha256 definitions
Remove:

- sha1, sha384, sha512 related structures and helpers
- HKDF definitions
- USHA definitions

Keep HMAC.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-03-24 22:20:19 +01:00
David Sterba 3a73bc1b37 btrfs-progs: move sha256 from tests to crypto/
The SHA256 is going to be used in the future, so this makes it a second
user and we also have the appropriate directory now.

Signed-off-by: David Sterba <dsterba@suse.com>
2019-11-18 19:20:02 +01:00