Maybe it would be desirable to use an enum salt_types { Reset_Code_salt, User_PIN_salt, Admin_PIN_salt } ? Directly passing those literals look quite fragile maintainability- wise. Good job figuring it out, Kirill!