Properly pad or cut the key/IV when needed.