getalgfromsalt
static char *getalgfromsalt(const char *salt);
if ((algname = getalgfromsalt(salt)) == NULL) {
algname = getalgfromsalt(oldsalt);