Calcium cyanide
Calcium cyanide is the inorganic compound with the formula Ca(CN)2. It is  the calcium salt derived from hydrocyanic acid. It is a white solid, although the pure material is rarely encountered. It hydrolyses readily (even in moist air) to release hydrogen cyanide and is very toxic. Preparation
Solutions of calcium cyanide can be prepared by treating calcium hydroxide with hydrogen cyanide. Solid calcium cyanide is produced commercially by heating calcium cyanamide with sodium chloride. The reaction is incomplete. The product is only of 50% purity, other components being sodium cyanide, calcium cyanamide, and carbon. Because of the carbon impurity, the solid is black, hence material is often called black cyanide. Reactivity
At temperatures around 600 °C, calcium cyanide converts to calcium cyanamide:   
Ca(CN)2   →  CaCN2  +  C
It is suspected that this reaction is one step in the conversion of calcium carbide with nitrogen gas. The ratio of calcium cyanide to calcium cyanamide is sensitive to the presence of alkali metal halides, such as sodium chloride. Calcium cyanide hydrolyzes upon acidification to form hydrogen cyanide:
Ca(CN)2  +  2H+   →   Ca2+  +  2HCN
Calcium cyanide reacts with ammonium carbonate to give produce ammonium cyanide:
Ca(CN)2 + (NH4)2CO3 → 2NH4CN  +  CaCO3

Uses

Calcium cyanide is used almost exclusively in the mining industry. It serves as an inexpensive source of cyanide in many leaching or vat operation to obtain precious metals such as gold and silver from their ores. Safety

Like other cyanide salts, this compound is highly toxic and its use is strictly regulated. References

External links 
 Hydrogen Cyanide and Cyanide Salts (CASRN Various)

Cyanides
Cyanide
Gold mining