Fixed the magic and algorithm name mapping.
Fixed parameter generation on key import.
Fixed the signHash() method (fixes #6).