Second, he shows the reaction of Leviathan to what God does against him, when he says, "His heart will be hardened like stone." Hardness describes a natural power which is not easily corrupted by an exterior agent. This verse shows the natural power of the heart of the whale, because he is not easily corrupted by an exterior agent trying to harm him. To indicate this hardness, the example of the stone was sufficient when one was talking about light blows, but not about greater ones, for although one cannot break a stone with his hand, it still can be broken with an iron hammer. So to indicate ...the power of the whale even against grave harms he says, "he is compressed together like the blacksmith's anvil," which is not shattered by the striking of hammers but seems more solid. With this verse he describes the obstinacy in evil of the devil and his members, since they are not softened regarding evil by divine blows.
Source: Commentary on Job