CHANGE: added some tests, removed deprecated methods, changes random engine implementation to one that based on SecureRandom