private method GenarateSecret changed to public