To preheat, set your oven to 180 degrees Celsius or 350 degrees Fahrenheit. Then, grease two cake pans. After that, line with parchment paper and dust them with flour.
Afterward, in a bowl, sift the flour, salt, and baking powder. Then, add the cocoa powder (sweetened and unsweetened) into the flour and set it aside.
After that, cream your butter and sugar using an electric mixer until it becomes light and fluffy. Then, scrape the bowl's sides using a rubber spatula every few minutes.
Next, add in the eggs one piece at a time, ensuring that each egg incorporates properly before adding another one. Then, scrape the bowl's side after each addition of eggs to combine everything properly.
After that, add the vanilla extract to the mixture.
Using an electric mixer, add the flour and buttermilk in three alternating additions. Make sure to do this in the beginning and ending with the flour. Afterward, mix at low speed and scrape the bowl's sides during the process. Then, combine the batter well, but please do not overmix.
After that, pour and divide the cake batter into the prepared cake pans. Ensure to bake your cake in the oven for 30-40 minutes.
If the cake cooks thoroughly, take it out of the oven and cool over the counter for 5-10 minutes. Then, to cool completely, turn it out onto the cooling rack.