Preheat oven to 350 degrees. Line an 8-inch square baking pan with parchment paper. Melt butter and chocolate in a double boiler or a heatproof bowl set over a pot of simmering water, stirring until smooth. Remove from heat, and whisk in sugar. Whisk in eggs, one at a time, until combined. Whisk in cocoa and salt. Fold in flour until combined.