Simplify cipher and digest lookup in PKCS#7 code.