ppccap.c: Split out algorithm-specific functions