Added KeyGenerator.cs and unit tests.