dm_crypt: Extend unit tests to cover both ciphers
The current tests (that maps crypt device & checks if data is accessible
or not) only covered for the default cipher. Extend the tests for both
the ciphers (and correct key size).
This patch also add logic to validate_key_size depending on chosen
cipher in dm_rust lib.
Test: atest libdm_rust.test
Bug: 259253336
Change-Id: Ie32c0882db364ac296f0ed55991ce079bee0fbb8
diff --git a/libs/devicemapper/Android.bp b/libs/devicemapper/Android.bp
index 783fa79..9fa010c 100644
--- a/libs/devicemapper/Android.bp
+++ b/libs/devicemapper/Android.bp
@@ -13,6 +13,7 @@
"libbitflags",
"liblibc",
"libdata_model",
+ "libhex",
"libnix",
"libuuid",
],
@@ -33,6 +34,7 @@
defaults: ["libdm_rust.defaults"],
test_suites: ["general-tests"],
rustlibs: [
+ "librustutils",
"libscopeguard",
"libtempfile",
],