Added secure random algorithm