When using AES-256 (cipher mode CBC and padding mode PKCS7) in combination with HMAC-SHA for authenticated encryption (assuming alternatives like TLS and AES-GCM cannot be used), should we use SHA-256 or SHA-512? This answer seems to indicate SHA512. Is this interpretation correct? I've seen an implementation using SHA256 and cannot figure out, why.
Edit: Since it does not seem to be entirely clear: I'm talking about an algorithm using HMAC-SHA for authentification and Aes256 for encryption ("Encrypt-then-MAC") in order to provide authenticated encryption.