Fix for createkey, was incompatible with crypto object
Merge pull request #228 from NielsZeilemaker/createkey_fix

Fix for createkey, was incompatible with crypto object