Enhance secure utility and create simple tests