CI_Encryption: Fix some errors and add unit tests for hkdf()