mmc-utils: Refactor RPMB key handling into a separate function

This patch refactors the key handling logic into a new function
`rpmb_get_key`. The new function centralizes the logic for reading the
key from a file or standard input, and optionally performing HMAC SHA256
encryption.

Signed-off-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20250407082833.108616-7-avri.altman@sandisk.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 file changed