# Can I use PKCS#5 with CBC? [duplicate]

As far as I know there are two padding mechanisms, which are PKCS 5 and 7. Which one should be used for CBC?

PKCS#5 describes a padding that wrote down 8-n padding bytes, but was only valid for DES and RC2.
PKCS#7 described a padding scheme which wrote down k-n bytes for a k-byte block cipher.