What does the code of Hammurabi contain?

A. Texts that explain hoe to cast spells
B. Rules and regulations for living in society
C. Information to crack encrypted messages
D. Instructions for creating a utopia