[PATCH v2 2/2] KEYS: asymmetric: properly validate hash_algo and encoding