PHP Classes
elePHPant
Icontem

File: docs/html/source/abstractclass/UserCredentialAbstract.php.xhtml

Recommend this page to a friend!
  Classes of Cyril Ogana  >  PHP User Credentials  >  docs/html/source/abstractclass/UserCredentialAbstract.php.xhtml  >  Download  
File: docs/html/source/abstractclass/UserCredentialAbstract.php.xhtml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP User Credentials
Implement password authentication policies
Author: By
Last change:
Date: 2 years ago
Size: 328,053 bytes
 

Contents

Class file image Download
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><title>phpDox - Source of UserCredentialAbstract.php</title><link rel="stylesheet" type="text/css" href="../../css/style.css" media="screen"/><link rel="stylesheet" href="../../css/source.css"/><meta http-equiv="content-type" content="text/html; charset=utf-8"/></head><body><nav class="topnav"><ul><li><div class="logo"><span>/**</span>phpDox</div></li><li class="separator"><a href="../../index.xhtml">Overview</a></li><li class="separator"><a href="../../namespaces.xhtml">Namespaces</a></li><li><a href="../../interfaces.xhtml">Interfaces</a></li><li><a href="../../classes.xhtml">Classes</a></li><li class="separator"><a href="../../source/index.xhtml">Source</a></li></ul></nav><div id="mainstage"><div class="box"><ul class="breadcrumb"><li><a href="../../index.xhtml">Overview</a></li><li class="separator"><a href="../../source/index.xhtml">Source</a></li></ul></div><h1>Source of file UserCredentialAbstract.php</h1><p>
                        Size: 35,781 Bytes - Last Modified: 2015-07-18T03:41:36+03:00</p><section><h2><small>/home/rhossis/NetBeansProjects/cymapgt/core/application/authentication/UserCredential/src/abstractclass/</small>UserCredentialAbstract.php</h2><table class="source"><tr><td class="no"><a class="anker" href="#line1">1</a><a class="anker" href="#line2">2</a><a class="anker" href="#line3">3</a><a class="anker" href="#line4">4</a><a class="anker" href="#line5">5</a><a class="anker" href="#line6">6</a><a class="anker" href="#line7">7</a><a class="anker" href="#line8">8</a><a class="anker" href="#line9">9</a><a class="anker" href="#line10">10</a><a class="anker" href="#line11">11</a><a class="anker" href="#line12">12</a><a class="anker" href="#line13">13</a><a class="anker" href="#line14">14</a><a class="anker" href="#line15">15</a><a class="anker" href="#line16">16</a><a class="anker" href="#line17">17</a><a class="anker" href="#line18">18</a><a class="anker" href="#line19">19</a><a class="anker" href="#line20">20</a><a class="anker" href="#line21">21</a><a class="anker" href="#line22">22</a><a class="anker" href="#line23">23</a><a class="anker" href="#line24">24</a><a class="anker" href="#line25">25</a><a class="anker" href="#line26">26</a><a class="anker" href="#line27">27</a><a class="anker" href="#line28">28</a><a class="anker" href="#line29">29</a><a class="anker" href="#line30">30</a><a class="anker" href="#line31">31</a><a class="anker" href="#line32">32</a><a class="anker" href="#line33">33</a><a class="anker" href="#line34">34</a><a class="anker" href="#line35">35</a><a class="anker" href="#line36">36</a><a class="anker" href="#line37">37</a><a class="anker" href="#line38">38</a><a class="anker" href="#line39">39</a><a class="anker" href="#line40">40</a><a class="anker" href="#line41">41</a><a class="anker" href="#line42">42</a><a class="anker" href="#line43">43</a><a class="anker" href="#line44">44</a><a class="anker" href="#line45">45</a><a class="anker" href="#line46">46</a><a class="anker" href="#line47">47</a><a class="anker" href="#line48">48</a><a class="anker" href="#line49">49</a><a class="anker" href="#line50">50</a><a class="anker" href="#line51">51</a><a class="anker" href="#line52">52</a><a class="anker" href="#line53">53</a><a class="anker" href="#line54">54</a><a class="anker" href="#line55">55</a><a class="anker" href="#line56">56</a><a class="anker" href="#line57">57</a><a class="anker" href="#line58">58</a><a class="anker" href="#line59">59</a><a class="anker" href="#line60">60</a><a class="anker" href="#line61">61</a><a class="anker" href="#line62">62</a><a class="anker" href="#line63">63</a><a class="anker" href="#line64">64</a><a class="anker" href="#line65">65</a><a class="anker" href="#line66">66</a><a class="anker" href="#line67">67</a><a class="anker" href="#line68">68</a><a class="anker" href="#line69">69</a><a class="anker" href="#line70">70</a><a class="anker" href="#line71">71</a><a class="anker" href="#line72">72</a><a class="anker" href="#line73">73</a><a class="anker" href="#line74">74</a><a class="anker" href="#line75">75</a><a class="anker" href="#line76">76</a><a class="anker" href="#line77">77</a><a class="anker" href="#line78">78</a><a class="anker" href="#line79">79</a><a class="anker" href="#line80">80</a><a class="anker" href="#line81">81</a><a class="anker" href="#line82">82</a><a class="anker" href="#line83">83</a><a class="anker" href="#line84">84</a><a class="anker" href="#line85">85</a><a class="anker" href="#line86">86</a><a class="anker" href="#line87">87</a><a class="anker" href="#line88">88</a><a class="anker" href="#line89">89</a><a class="anker" href="#line90">90</a><a class="anker" href="#line91">91</a><a class="anker" href="#line92">92</a><a class="anker" href="#line93">93</a><a class="anker" href="#line94">94</a><a class="anker" href="#line95">95</a><a class="anker" href="#line96">96</a><a class="anker" href="#line97">97</a><a class="anker" href="#line98">98</a><a class="anker" href="#line99">99</a><a class="anker" href="#line100">100</a><a class="anker" href="#line101">101</a><a class="anker" href="#line102">102</a><a class="anker" href="#line103">103</a><a class="anker" href="#line104">104</a><a class="anker" href="#line105">105</a><a class="anker" href="#line106">106</a><a class="anker" href="#line107">107</a><a class="anker" href="#line108">108</a><a class="anker" href="#line109">109</a><a class="anker" href="#line110">110</a><a class="anker" href="#line111">111</a><a class="anker" href="#line112">112</a><a class="anker" href="#line113">113</a><a class="anker" href="#line114">114</a><a class="anker" href="#line115">115</a><a class="anker" href="#line116">116</a><a class="anker" href="#line117">117</a><a class="anker" href="#line118">118</a><a class="anker" href="#line119">119</a><a class="anker" href="#line120">120</a><a class="anker" href="#line121">121</a><a class="anker" href="#line122">122</a><a class="anker" href="#line123">123</a><a class="anker" href="#line124">124</a><a class="anker" href="#line125">125</a><a class="anker" href="#line126">126</a><a class="anker" href="#line127">127</a><a class="anker" href="#line128">128</a><a class="anker" href="#line129">129</a><a class="anker" href="#line130">130</a><a class="anker" href="#line131">131</a><a class="anker" href="#line132">132</a><a class="anker" href="#line133">133</a><a class="anker" href="#line134">134</a><a class="anker" href="#line135">135</a><a class="anker" href="#line136">136</a><a class="anker" href="#line137">137</a><a class="anker" href="#line138">138</a><a class="anker" href="#line139">139</a><a class="anker" href="#line140">140</a><a class="anker" href="#line141">141</a><a class="anker" href="#line142">142</a><a class="anker" href="#line143">143</a><a class="anker" href="#line144">144</a><a class="anker" href="#line145">145</a><a class="anker" href="#line146">146</a><a class="anker" href="#line147">147</a><a class="anker" href="#line148">148</a><a class="anker" href="#line149">149</a><a class="anker" href="#line150">150</a><a class="anker" href="#line151">151</a><a class="anker" href="#line152">152</a><a class="anker" href="#line153">153</a><a class="anker" href="#line154">154</a><a class="anker" href="#line155">155</a><a class="anker" href="#line156">156</a><a class="anker" href="#line157">157</a><a class="anker" href="#line158">158</a><a class="anker" href="#line159">159</a><a class="anker" href="#line160">160</a><a class="anker" href="#line161">161</a><a class="anker" href="#line162">162</a><a class="anker" href="#line163">163</a><a class="anker" href="#line164">164</a><a class="anker" href="#line165">165</a><a class="anker" href="#line166">166</a><a class="anker" href="#line167">167</a><a class="anker" href="#line168">168</a><a class="anker" href="#line169">169</a><a class="anker" href="#line170">170</a><a class="anker" href="#line171">171</a><a class="anker" href="#line172">172</a><a class="anker" href="#line173">173</a><a class="anker" href="#line174">174</a><a class="anker" href="#line175">175</a><a class="anker" href="#line176">176</a><a class="anker" href="#line177">177</a><a class="anker" href="#line178">178</a><a class="anker" href="#line179">179</a><a class="anker" href="#line180">180</a><a class="anker" href="#line181">181</a><a class="anker" href="#line182">182</a><a class="anker" href="#line183">183</a><a class="anker" href="#line184">184</a><a class="anker" href="#line185">185</a><a class="anker" href="#line186">186</a><a class="anker" href="#line187">187</a><a class="anker" href="#line188">188</a><a class="anker" href="#line189">189</a><a class="anker" href="#line190">190</a><a class="anker" href="#line191">191</a><a class="anker" href="#line192">192</a><a class="anker" href="#line193">193</a><a class="anker" href="#line194">194</a><a class="anker" href="#line195">195</a><a class="anker" href="#line196">196</a><a class="anker" href="#line197">197</a><a class="anker" href="#line198">198</a><a class="anker" href="#line199">199</a><a class="anker" href="#line200">200</a><a class="anker" href="#line201">201</a><a class="anker" href="#line202">202</a><a class="anker" href="#line203">203</a><a class="anker" href="#line204">204</a><a class="anker" href="#line205">205</a><a class="anker" href="#line206">206</a><a class="anker" href="#line207">207</a><a class="anker" href="#line208">208</a><a class="anker" href="#line209">209</a><a class="anker" href="#line210">210</a><a class="anker" href="#line211">211</a><a class="anker" href="#line212">212</a><a class="anker" href="#line213">213</a><a class="anker" href="#line214">214</a><a class="anker" href="#line215">215</a><a class="anker" href="#line216">216</a><a class="anker" href="#line217">217</a><a class="anker" href="#line218">218</a><a class="anker" href="#line219">219</a><a class="anker" href="#line220">220</a><a class="anker" href="#line221">221</a><a class="anker" href="#line222">222</a><a class="anker" href="#line223">223</a><a class="anker" href="#line224">224</a><a class="anker" href="#line225">225</a><a class="anker" href="#line226">226</a><a class="anker" href="#line227">227</a><a class="anker" href="#line228">228</a><a class="anker" href="#line229">229</a><a class="anker" href="#line230">230</a><a class="anker" href="#line231">231</a><a class="anker" href="#line232">232</a><a class="anker" href="#line233">233</a><a class="anker" href="#line234">234</a><a class="anker" href="#line235">235</a><a class="anker" href="#line236">236</a><a class="anker" href="#line237">237</a><a class="anker" href="#line238">238</a><a class="anker" href="#line239">239</a><a class="anker" href="#line240">240</a><a class="anker" href="#line241">241</a><a class="anker" href="#line242">242</a><a class="anker" href="#line243">243</a><a class="anker" href="#line244">244</a><a class="anker" href="#line245">245</a><a class="anker" href="#line246">246</a><a class="anker" href="#line247">247</a><a class="anker" href="#line248">248</a><a class="anker" href="#line249">249</a><a class="anker" href="#line250">250</a><a class="anker" href="#line251">251</a><a class="anker" href="#line252">252</a><a class="anker" href="#line253">253</a><a class="anker" href="#line254">254</a><a class="anker" href="#line255">255</a><a class="anker" href="#line256">256</a><a class="anker" href="#line257">257</a><a class="anker" href="#line258">258</a><a class="anker" href="#line259">259</a><a class="anker" href="#line260">260</a><a class="anker" href="#line261">261</a><a class="anker" href="#line262">262</a><a class="anker" href="#line263">263</a><a class="anker" href="#line264">264</a><a class="anker" href="#line265">265</a><a class="anker" href="#line266">266</a><a class="anker" href="#line267">267</a><a class="anker" href="#line268">268</a><a class="anker" href="#line269">269</a><a class="anker" href="#line270">270</a><a class="anker" href="#line271">271</a><a class="anker" href="#line272">272</a><a class="anker" href="#line273">273</a><a class="anker" href="#line274">274</a><a class="anker" href="#line275">275</a><a class="anker" href="#line276">276</a><a class="anker" href="#line277">277</a><a class="anker" href="#line278">278</a><a class="anker" href="#line279">279</a><a class="anker" href="#line280">280</a><a class="anker" href="#line281">281</a><a class="anker" href="#line282">282</a><a class="anker" href="#line283">283</a><a class="anker" href="#line284">284</a><a class="anker" href="#line285">285</a><a class="anker" href="#line286">286</a><a class="anker" href="#line287">287</a><a class="anker" href="#line288">288</a><a class="anker" href="#line289">289</a><a class="anker" href="#line290">290</a><a class="anker" href="#line291">291</a><a class="anker" href="#line292">292</a><a class="anker" href="#line293">293</a><a class="anker" href="#line294">294</a><a class="anker" href="#line295">295</a><a class="anker" href="#line296">296</a><a class="anker" href="#line297">297</a><a class="anker" href="#line298">298</a><a class="anker" href="#line299">299</a><a class="anker" href="#line300">300</a><a class="anker" href="#line301">301</a><a class="anker" href="#line302">302</a><a class="anker" href="#line303">303</a><a class="anker" href="#line304">304</a><a class="anker" href="#line305">305</a><a class="anker" href="#line306">306</a><a class="anker" href="#line307">307</a><a class="anker" href="#line308">308</a><a class="anker" href="#line309">309</a><a class="anker" href="#line310">310</a><a class="anker" href="#line311">311</a><a class="anker" href="#line312">312</a><a class="anker" href="#line313">313</a><a class="anker" href="#line314">314</a><a class="anker" href="#line315">315</a><a class="anker" href="#line316">316</a><a class="anker" href="#line317">317</a><a class="anker" href="#line318">318</a><a class="anker" href="#line319">319</a><a class="anker" href="#line320">320</a><a class="anker" href="#line321">321</a><a class="anker" href="#line322">322</a><a class="anker" href="#line323">323</a><a class="anker" href="#line324">324</a><a class="anker" href="#line325">325</a><a class="anker" href="#line326">326</a><a class="anker" href="#line327">327</a><a class="anker" href="#line328">328</a><a class="anker" href="#line329">329</a><a class="anker" href="#line330">330</a><a class="anker" href="#line331">331</a><a class="anker" href="#line332">332</a><a class="anker" href="#line333">333</a><a class="anker" href="#line334">334</a><a class="anker" href="#line335">335</a><a class="anker" href="#line336">336</a><a class="anker" href="#line337">337</a><a class="anker" href="#line338">338</a><a class="anker" href="#line339">339</a><a class="anker" href="#line340">340</a><a class="anker" href="#line341">341</a><a class="anker" href="#line342">342</a><a class="anker" href="#line343">343</a><a class="anker" href="#line344">344</a><a class="anker" href="#line345">345</a><a class="anker" href="#line346">346</a><a class="anker" href="#line347">347</a><a class="anker" href="#line348">348</a><a class="anker" href="#line349">349</a><a class="anker" href="#line350">350</a><a class="anker" href="#line351">351</a><a class="anker" href="#line352">352</a><a class="anker" href="#line353">353</a><a class="anker" href="#line354">354</a><a class="anker" href="#line355">355</a><a class="anker" href="#line356">356</a><a class="anker" href="#line357">357</a><a class="anker" href="#line358">358</a><a class="anker" href="#line359">359</a><a class="anker" href="#line360">360</a><a class="anker" href="#line361">361</a><a class="anker" href="#line362">362</a><a class="anker" href="#line363">363</a><a class="anker" href="#line364">364</a><a class="anker" href="#line365">365</a><a class="anker" href="#line366">366</a><a class="anker" href="#line367">367</a><a class="anker" href="#line368">368</a><a class="anker" href="#line369">369</a><a class="anker" href="#line370">370</a><a class="anker" href="#line371">371</a><a class="anker" href="#line372">372</a><a class="anker" href="#line373">373</a><a class="anker" href="#line374">374</a><a class="anker" href="#line375">375</a><a class="anker" href="#line376">376</a><a class="anker" href="#line377">377</a><a class="anker" href="#line378">378</a><a class="anker" href="#line379">379</a><a class="anker" href="#line380">380</a><a class="anker" href="#line381">381</a><a class="anker" href="#line382">382</a><a class="anker" href="#line383">383</a><a class="anker" href="#line384">384</a><a class="anker" href="#line385">385</a><a class="anker" href="#line386">386</a><a class="anker" href="#line387">387</a><a class="anker" href="#line388">388</a><a class="anker" href="#line389">389</a><a class="anker" href="#line390">390</a><a class="anker" href="#line391">391</a><a class="anker" href="#line392">392</a><a class="anker" href="#line393">393</a><a class="anker" href="#line394">394</a><a class="anker" href="#line395">395</a><a class="anker" href="#line396">396</a><a class="anker" href="#line397">397</a><a class="anker" href="#line398">398</a><a class="anker" href="#line399">399</a><a class="anker" href="#line400">400</a><a class="anker" href="#line401">401</a><a class="anker" href="#line402">402</a><a class="anker" href="#line403">403</a><a class="anker" href="#line404">404</a><a class="anker" href="#line405">405</a><a class="anker" href="#line406">406</a><a class="anker" href="#line407">407</a><a class="anker" href="#line408">408</a><a class="anker" href="#line409">409</a><a class="anker" href="#line410">410</a><a class="anker" href="#line411">411</a><a class="anker" href="#line412">412</a><a class="anker" href="#line413">413</a><a class="anker" href="#line414">414</a><a class="anker" href="#line415">415</a><a class="anker" href="#line416">416</a><a class="anker" href="#line417">417</a><a class="anker" href="#line418">418</a><a class="anker" href="#line419">419</a><a class="anker" href="#line420">420</a><a class="anker" href="#line421">421</a><a class="anker" href="#line422">422</a><a class="anker" href="#line423">423</a><a class="anker" href="#line424">424</a><a class="anker" href="#line425">425</a><a class="anker" href="#line426">426</a><a class="anker" href="#line427">427</a><a class="anker" href="#line428">428</a><a class="anker" href="#line429">429</a><a class="anker" href="#line430">430</a><a class="anker" href="#line431">431</a><a class="anker" href="#line432">432</a><a class="anker" href="#line433">433</a><a class="anker" href="#line434">434</a><a class="anker" href="#line435">435</a><a class="anker" href="#line436">436</a><a class="anker" href="#line437">437</a><a class="anker" href="#line438">438</a><a class="anker" href="#line439">439</a><a class="anker" href="#line440">440</a><a class="anker" href="#line441">441</a><a class="anker" href="#line442">442</a><a class="anker" href="#line443">443</a><a class="anker" href="#line444">444</a><a class="anker" href="#line445">445</a><a class="anker" href="#line446">446</a><a class="anker" href="#line447">447</a><a class="anker" href="#line448">448</a><a class="anker" href="#line449">449</a><a class="anker" href="#line450">450</a><a class="anker" href="#line451">451</a><a class="anker" href="#line452">452</a><a class="anker" href="#line453">453</a><a class="anker" href="#line454">454</a><a class="anker" href="#line455">455</a><a class="anker" href="#line456">456</a><a class="anker" href="#line457">457</a><a class="anker" href="#line458">458</a><a class="anker" href="#line459">459</a><a class="anker" href="#line460">460</a><a class="anker" href="#line461">461</a><a class="anker" href="#line462">462</a><a class="anker" href="#line463">463</a><a class="anker" href="#line464">464</a><a class="anker" href="#line465">465</a><a class="anker" href="#line466">466</a><a class="anker" href="#line467">467</a><a class="anker" href="#line468">468</a><a class="anker" href="#line469">469</a><a class="anker" href="#line470">470</a><a class="anker" href="#line471">471</a><a class="anker" href="#line472">472</a><a class="anker" href="#line473">473</a><a class="anker" href="#line474">474</a><a class="anker" href="#line475">475</a><a class="anker" href="#line476">476</a><a class="anker" href="#line477">477</a><a class="anker" href="#line478">478</a><a class="anker" href="#line479">479</a><a class="anker" href="#line480">480</a><a class="anker" href="#line481">481</a><a class="anker" href="#line482">482</a><a class="anker" href="#line483">483</a><a class="anker" href="#line484">484</a><a class="anker" href="#line485">485</a><a class="anker" href="#line486">486</a><a class="anker" href="#line487">487</a><a class="anker" href="#line488">488</a><a class="anker" href="#line489">489</a><a class="anker" href="#line490">490</a><a class="anker" href="#line491">491</a><a class="anker" href="#line492">492</a><a class="anker" href="#line493">493</a><a class="anker" href="#line494">494</a><a class="anker" href="#line495">495</a><a class="anker" href="#line496">496</a><a class="anker" href="#line497">497</a><a class="anker" href="#line498">498</a><a class="anker" href="#line499">499</a><a class="anker" href="#line500">500</a><a class="anker" href="#line501">501</a><a class="anker" href="#line502">502</a><a class="anker" href="#line503">503</a><a class="anker" href="#line504">504</a><a class="anker" href="#line505">505</a><a class="anker" href="#line506">506</a><a class="anker" href="#line507">507</a><a class="anker" href="#line508">508</a><a class="anker" href="#line509">509</a><a class="anker" href="#line510">510</a><a class="anker" href="#line511">511</a><a class="anker" href="#line512">512</a><a class="anker" href="#line513">513</a><a class="anker" href="#line514">514</a><a class="anker" href="#line515">515</a><a class="anker" href="#line516">516</a><a class="anker" href="#line517">517</a><a class="anker" href="#line518">518</a><a class="anker" href="#line519">519</a><a class="anker" href="#line520">520</a><a class="anker" href="#line521">521</a><a class="anker" href="#line522">522</a><a class="anker" href="#line523">523</a><a class="anker" href="#line524">524</a><a class="anker" href="#line525">525</a><a class="anker" href="#line526">526</a><a class="anker" href="#line527">527</a><a class="anker" href="#line528">528</a><a class="anker" href="#line529">529</a><a class="anker" href="#line530">530</a><a class="anker" href="#line531">531</a><a class="anker" href="#line532">532</a><a class="anker" href="#line533">533</a><a class="anker" href="#line534">534</a><a class="anker" href="#line535">535</a><a class="anker" href="#line536">536</a><a class="anker" href="#line537">537</a><a class="anker" href="#line538">538</a><a class="anker" href="#line539">539</a><a class="anker" href="#line540">540</a><a class="anker" href="#line541">541</a><a class="anker" href="#line542">542</a><a class="anker" href="#line543">543</a><a class="anker" href="#line544">544</a><a class="anker" href="#line545">545</a><a class="anker" href="#line546">546</a><a class="anker" href="#line547">547</a><a class="anker" href="#line548">548</a><a class="anker" href="#line549">549</a><a class="anker" href="#line550">550</a><a class="anker" href="#line551">551</a><a class="anker" href="#line552">552</a><a class="anker" href="#line553">553</a><a class="anker" href="#line554">554</a><a class="anker" href="#line555">555</a><a class="anker" href="#line556">556</a><a class="anker" href="#line557">557</a><a class="anker" href="#line558">558</a><a class="anker" href="#line559">559</a><a class="anker" href="#line560">560</a><a class="anker" href="#line561">561</a><a class="anker" href="#line562">562</a><a class="anker" href="#line563">563</a><a class="anker" href="#line564">564</a><a class="anker" href="#line565">565</a><a class="anker" href="#line566">566</a><a class="anker" href="#line567">567</a><a class="anker" href="#line568">568</a><a class="anker" href="#line569">569</a><a class="anker" href="#line570">570</a><a class="anker" href="#line571">571</a><a class="anker" href="#line572">572</a><a class="anker" href="#line573">573</a><a class="anker" href="#line574">574</a><a class="anker" href="#line575">575</a><a class="anker" href="#line576">576</a><a class="anker" href="#line577">577</a><a class="anker" href="#line578">578</a><a class="anker" href="#line579">579</a><a class="anker" href="#line580">580</a><a class="anker" href="#line581">581</a><a class="anker" href="#line582">582</a><a class="anker" href="#line583">583</a><a class="anker" href="#line584">584</a><a class="anker" href="#line585">585</a><a class="anker" href="#line586">586</a><a class="anker" href="#line587">587</a><a class="anker" href="#line588">588</a><a class="anker" href="#line589">589</a><a class="anker" href="#line590">590</a><a class="anker" href="#line591">591</a><a class="anker" href="#line592">592</a><a class="anker" href="#line593">593</a><a class="anker" href="#line594">594</a><a class="anker" href="#line595">595</a><a class="anker" href="#line596">596</a><a class="anker" href="#line597">597</a><a class="anker" href="#line598">598</a><a class="anker" href="#line599">599</a><a class="anker" href="#line600">600</a><a class="anker" href="#line601">601</a><a class="anker" href="#line602">602</a><a class="anker" href="#line603">603</a><a class="anker" href="#line604">604</a><a class="anker" href="#line605">605</a><a class="anker" href="#line606">606</a><a class="anker" href="#line607">607</a><a class="anker" href="#line608">608</a><a class="anker" href="#line609">609</a><a class="anker" href="#line610">610</a><a class="anker" href="#line611">611</a><a class="anker" href="#line612">612</a><a class="anker" href="#line613">613</a><a class="anker" href="#line614">614</a><a class="anker" href="#line615">615</a><a class="anker" href="#line616">616</a><a class="anker" href="#line617">617</a><a class="anker" href="#line618">618</a><a class="anker" href="#line619">619</a><a class="anker" href="#line620">620</a><a class="anker" href="#line621">621</a><a class="anker" href="#line622">622</a><a class="anker" href="#line623">623</a><a class="anker" href="#line624">624</a><a class="anker" href="#line625">625</a><a class="anker" href="#line626">626</a><a class="anker" href="#line627">627</a><a class="anker" href="#line628">628</a><a class="anker" href="#line629">629</a><a class="anker" href="#line630">630</a><a class="anker" href="#line631">631</a><a class="anker" href="#line632">632</a><a class="anker" href="#line633">633</a><a class="anker" href="#line634">634</a><a class="anker" href="#line635">635</a><a class="anker" href="#line636">636</a><a class="anker" href="#line637">637</a><a class="anker" href="#line638">638</a><a class="anker" href="#line639">639</a><a class="anker" href="#line640">640</a><a class="anker" href="#line641">641</a><a class="anker" href="#line642">642</a><a class="anker" href="#line643">643</a><a class="anker" href="#line644">644</a><a class="anker" href="#line645">645</a><a class="anker" href="#line646">646</a><a class="anker" href="#line647">647</a><a class="anker" href="#line648">648</a><a class="anker" href="#line649">649</a><a class="anker" href="#line650">650</a><a class="anker" href="#line651">651</a><a class="anker" href="#line652">652</a><a class="anker" href="#line653">653</a><a class="anker" href="#line654">654</a><a class="anker" href="#line655">655</a><a class="anker" href="#line656">656</a><a class="anker" href="#line657">657</a><a class="anker" href="#line658">658</a><a class="anker" href="#line659">659</a><a class="anker" href="#line660">660</a><a class="anker" href="#line661">661</a><a class="anker" href="#line662">662</a><a class="anker" href="#line663">663</a><a class="anker" href="#line664">664</a><a class="anker" href="#line665">665</a><a class="anker" href="#line666">666</a><a class="anker" href="#line667">667</a><a class="anker" href="#line668">668</a><a class="anker" href="#line669">669</a><a class="anker" href="#line670">670</a><a class="anker" href="#line671">671</a><a class="anker" href="#line672">672</a><a class="anker" href="#line673">673</a><a class="anker" href="#line674">674</a><a class="anker" href="#line675">675</a><a class="anker" href="#line676">676</a><a class="anker" href="#line677">677</a><a class="anker" href="#line678">678</a><a class="anker" href="#line679">679</a><a class="anker" href="#line680">680</a><a class="anker" href="#line681">681</a><a class="anker" href="#line682">682</a><a class="anker" href="#line683">683</a><a class="anker" href="#line684">684</a><a class="anker" href="#line685">685</a><a class="anker" href="#line686">686</a><a class="anker" href="#line687">687</a><a class="anker" href="#line688">688</a><a class="anker" href="#line689">689</a><a class="anker" href="#line690">690</a><a class="anker" href="#line691">691</a><a class="anker" href="#line692">692</a><a class="anker" href="#line693">693</a><a class="anker" href="#line694">694</a><a class="anker" href="#line695">695</a><a class="anker" href="#line696">696</a><a class="anker" href="#line697">697</a><a class="anker" href="#line698">698</a><a class="anker" href="#line699">699</a><a class="anker" href="#line700">700</a><a class="anker" href="#line701">701</a><a class="anker" href="#line702">702</a><a class="anker" href="#line703">703</a><a class="anker" href="#line704">704</a><a class="anker" href="#line705">705</a><a class="anker" href="#line706">706</a><a class="anker" href="#line707">707</a><a class="anker" href="#line708">708</a><a class="anker" href="#line709">709</a><a class="anker" href="#line710">710</a><a class="anker" href="#line711">711</a><a class="anker" href="#line712">712</a><a class="anker" href="#line713">713</a><a class="anker" href="#line714">714</a><a class="anker" href="#line715">715</a><a class="anker" href="#line716">716</a><a class="anker" href="#line717">717</a><a class="anker" href="#line718">718</a><a class="anker" href="#line719">719</a><a class="anker" href="#line720">720</a><a class="anker" href="#line721">721</a><a class="anker" href="#line722">722</a><a class="anker" href="#line723">723</a><a class="anker" href="#line724">724</a><a class="anker" href="#line725">725</a><a class="anker" href="#line726">726</a><a class="anker" href="#line727">727</a><a class="anker" href="#line728">728</a><a class="anker" href="#line729">729</a><a class="anker" href="#line730">730</a><a class="anker" href="#line731">731</a><a class="anker" href="#line732">732</a><a class="anker" href="#line733">733</a><a class="anker" href="#line734">734</a><a class="anker" href="#line735">735</a><a class="anker" href="#line736">736</a><a class="anker" href="#line737">737</a><a class="anker" href="#line738">738</a><a class="anker" href="#line739">739</a><a class="anker" href="#line740">740</a><a class="anker" href="#line741">741</a><a class="anker" href="#line742">742</a><a class="anker" href="#line743">743</a><a class="anker" href="#line744">744</a><a class="anker" href="#line745">745</a><a class="anker" href="#line746">746</a><a class="anker" href="#line747">747</a><a class="anker" href="#line748">748</a><a class="anker" href="#line749">749</a><a class="anker" href="#line750">750</a><a class="anker" href="#line751">751</a><a class="anker" href="#line752">752</a><a class="anker" href="#line753">753</a><a class="anker" href="#line754">754</a><a class="anker" href="#line755">755</a><a class="anker" href="#line756">756</a><a class="anker" href="#line757">757</a><a class="anker" href="#line758">758</a><a class="anker" href="#line759">759</a><a class="anker" href="#line760">760</a><a class="anker" href="#line761">761</a><a class="anker" href="#line762">762</a><a class="anker" href="#line763">763</a><a class="anker" href="#line764">764</a><a class="anker" href="#line765">765</a><a class="anker" href="#line766">766</a><a class="anker" href="#line767">767</a><a class="anker" href="#line768">768</a><a class="anker" href="#line769">769</a><a class="anker" href="#line770">770</a><a class="anker" href="#line771">771</a><a class="anker" href="#line772">772</a><a class="anker" href="#line773">773</a><a class="anker" href="#line774">774</a><a class="anker" href="#line775">775</a><a class="anker" href="#line776">776</a><a class="anker" href="#line777">777</a><a class="anker" href="#line778">778</a><a class="anker" href="#line779">779</a><a class="anker" href="#line780">780</a><a class="anker" href="#line781">781</a><a class="anker" href="#line782">782</a><a class="anker" href="#line783">783</a><a class="anker" href="#line784">784</a><a class="anker" href="#line785">785</a><a class="anker" href="#line786">786</a><a class="anker" href="#line787">787</a><a class="anker" href="#line788">788</a><a class="anker" href="#line789">789</a><a class="anker" href="#line790">790</a><a class="anker" href="#line791">791</a><a class="anker" href="#line792">792</a><a class="anker" href="#line793">793</a><a class="anker" href="#line794">794</a><a class="anker" href="#line795">795</a><a class="anker" href="#line796">796</a><a class="anker" href="#line797">797</a><a class="anker" href="#line798">798</a><a class="anker" href="#line799">799</a><a class="anker" href="#line800">800</a><a class="anker" href="#line801">801</a><a class="anker" href="#line802">802</a><a class="anker" href="#line803">803</a><a class="anker" href="#line804">804</a><a class="anker" href="#line805">805</a><a class="anker" href="#line806">806</a><a class="anker" href="#line807">807</a><a class="anker" href="#line808">808</a><a class="anker" href="#line809">809</a><a class="anker" href="#line810">810</a><a class="anker" href="#line811">811</a><a class="anker" href="#line812">812</a><a class="anker" href="#line813">813</a><a class="anker" href="#line814">814</a><a class="anker" href="#line815">815</a><a class="anker" href="#line816">816</a><a class="anker" href="#line817">817</a><a class="anker" href="#line818">818</a><a class="anker" href="#line819">819</a><a class="anker" href="#line820">820</a><a class="anker" href="#line821">821</a><a class="anker" href="#line822">822</a><a class="anker" href="#line823">823</a><a class="anker" href="#line824">824</a><a class="anker" href="#line825">825</a><a class="anker" href="#line826">826</a><a class="anker" href="#line827">827</a><a class="anker" href="#line828">828</a><a class="anker" href="#line829">829</a><a class="anker" href="#line830">830</a><a class="anker" href="#line831">831</a><a class="anker" href="#line832">832</a><a class="anker" href="#line833">833</a><a class="anker" href="#line834">834</a><a class="anker" href="#line835">835</a><a class="anker" href="#line836">836</a><a class="anker" href="#line837">837</a><a class="anker" href="#line838">838</a><a class="anker" href="#line839">839</a><a class="anker" href="#line840">840</a><a class="anker" href="#line841">841</a><a class="anker" href="#line842">842</a><a class="anker" href="#line843">843</a><a class="anker" href="#line844">844</a><a class="anker" href="#line845">845</a><a class="anker" href="#line846">846</a><a class="anker" href="#line847">847</a><a class="anker" href="#line848">848</a><a class="anker" href="#line849">849</a><a class="anker" href="#line850">850</a><a class="anker" href="#line851">851</a><a class="anker" href="#line852">852</a><a class="anker" href="#line853">853</a><a class="anker" href="#line854">854</a><a class="anker" href="#line855">855</a><a class="anker" href="#line856">856</a><a class="anker" href="#line857">857</a><a class="anker" href="#line858">858</a><a class="anker" href="#line859">859</a><a class="anker" href="#line860">860</a><a class="anker" href="#line861">861</a><a class="anker" href="#line862">862</a><a class="anker" href="#line863">863</a><a class="anker" href="#line864">864</a><a class="anker" href="#line865">865</a><a class="anker" href="#line866">866</a><a class="anker" href="#line867">867</a><a class="anker" href="#line868">868</a><a class="anker" href="#line869">869</a><a class="anker" href="#line870">870</a><a class="anker" href="#line871">871</a><a class="anker" href="#line872">872</a><a class="anker" href="#line873">873</a><a class="anker" href="#line874">874</a><a class="anker" href="#line875">875</a><a class="anker" href="#line876">876</a><a class="anker" href="#line877">877</a><a class="anker" href="#line878">878</a><a class="anker" href="#line879">879</a><a class="anker" href="#line880">880</a><a class="anker" href="#line881">881</a><a class="anker" href="#line882">882</a><a class="anker" href="#line883">883</a><a class="anker" href="#line884">884</a><a class="anker" href="#line885">885</a><a class="anker" href="#line886">886</a><a class="anker" href="#line887">887</a><a class="anker" href="#line888">888</a><a class="anker" href="#line889">889</a><a class="anker" href="#line890">890</a><a class="anker" href="#line891">891</a><a class="anker" href="#line892">892</a><a class="anker" href="#line893">893</a><a class="anker" href="#line894">894</a><a class="anker" href="#line895">895</a><a class="anker" href="#line896">896</a><a class="anker" href="#line897">897</a><a class="anker" href="#line898">898</a><a class="anker" href="#line899">899</a><a class="anker" href="#line900">900</a><a class="anker" href="#line901">901</a><a class="anker" href="#line902">902</a><a class="anker" href="#line903">903</a><a class="anker" href="#line904">904</a><a class="anker" href="#line905">905</a><a class="anker" href="#line906">906</a><a class="anker" href="#line907">907</a><a class="anker" href="#line908">908</a><a class="anker" href="#line909">909</a><a class="anker" href="#line910">910</a></td><td class="line"><div id="line1"><pre><span class="token T_OPEN_TAG">&lt;?php</span></pre></div><div id="line2"><pre><span class="token T_NAMESPACE">namespace</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">cymapgt</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">core</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">application</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">authentication</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">UserCredential</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">abstractclass</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line3"><br/></div><div id="line4"><pre><span class="token T_USE">use</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">cymapgt</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">Exception</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line5"><pre><span class="token T_USE">use</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">Phpass</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">Strength</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line6"><br/></div><div id="line7"><pre><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line8"><pre><span class="token T_DOC_COMMENT"> * This package implements user password policy and credential management</span></pre></div><div id="line9"><pre><span class="token T_DOC_COMMENT"> *</span></pre></div><div id="line10"><pre><span class="token T_DOC_COMMENT"> * @category    security</span></pre></div><div id="line11"><pre><span class="token T_DOC_COMMENT"> * @package     cymapgt.core.application.authentication.UserCredential</span></pre></div><div id="line12"><pre><span class="token T_DOC_COMMENT"> * @copyright   Copyright (c) 2015 Cymap</span></pre></div><div id="line13"><pre><span class="token T_DOC_COMMENT"> * @author      Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line14"><pre><span class="token T_DOC_COMMENT"> * @abstract</span></pre></div><div id="line15"><pre><span class="token T_DOC_COMMENT"> * </span></pre></div><div id="line16"><pre><span class="token T_DOC_COMMENT"> *      - See http://www.owasp.org/images/0/08/OWASP_SCP_Quick_Reference_Guide_v2.pdf </span></pre></div><div id="line17"><pre><span class="token T_DOC_COMMENT"> *           (authentication section)</span></pre></div><div id="line18"><pre><span class="token T_DOC_COMMENT"> */</span></pre></div><div id="line19"><br/></div><div id="line20"><pre><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_CLASS">class</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialAbstract</span></pre></div><div id="line21"><pre><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line22"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PRIVATE">private</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$_userProfile</span><span class="token T_WHITESPACE">         </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_ARRAY">array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">      </span><span class="token T_COMMENT">//Array containing user information to use in the class</span></pre></div><div id="line23"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line24"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PRIVATE">private</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$_baseEntropySetting</span><span class="token T_WHITESPACE">  </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_ARRAY">array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">      </span><span class="token T_COMMENT">//This is the default entropy setting</span></pre></div><div id="line25"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PRIVATE">private</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$_baseEntropyOverride</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">false</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//A flag to turn off base entropy enforcement </span></pre></div><div id="line26"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PRIVATE">private</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$_udfEntropySetting</span><span class="token T_WHITESPACE">   </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_ARRAY">array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">      </span><span class="token T_COMMENT">//A variable to store the user defined entropy</span></pre></div><div id="line27"><br/></div><div id="line28"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PRIVATE">private</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$_basePasswordPolicy</span><span class="token T_WHITESPACE">  </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_ARRAY">array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">      </span><span class="token T_COMMENT">//Base password policy maintained by UserCredential class</span></pre></div><div id="line29"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PRIVATE">private</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$_udfPasswordPolicy</span><span class="token T_WHITESPACE">   </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_ARRAY">array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">      </span><span class="token T_COMMENT">//Udf password policy input by the user</span></pre></div><div id="line30"><pre><span class="token T_WHITESPACE">	</span></pre></div><div id="line31"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line32"><pre><span class="token T_WHITESPACE">    </span><span class="token T_COMMENT">/*</span></pre></div><div id="line33"><pre><span class="token T_COMMENT">     * Constructor method</span></pre></div><div id="line34"><pre><span class="token T_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt; - 2015-07-18</span></pre></div><div id="line35"><pre><span class="token T_COMMENT">     * </span></pre></div><div id="line36"><pre><span class="token T_COMMENT">     * @param array userProfile - array of user credential information</span></pre></div><div id="line37"><pre><span class="token T_COMMENT">     */</span></pre></div><div id="line38"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">__construct</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line39"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_initialize</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line40"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line41"><pre><span class="token T_WHITESPACE">	</span></pre></div><div id="line42"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line43"><pre><span class="token T_DOC_COMMENT">     * Initialize the classes default settings (base entropy)</span></pre></div><div id="line44"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt; - 2015-07-18</span></pre></div><div id="line45"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line46"><pre><span class="token T_DOC_COMMENT">     * @param array /ArrayAccess  userProfile</span></pre></div><div id="line47"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line48"><pre><span class="token T_DOC_COMMENT">     * @access private</span></pre></div><div id="line49"><pre><span class="token T_DOC_COMMENT">     */</span><span class="token T_WHITESPACE">             </span></pre></div><div id="line50"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PRIVATE">private</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_initialize</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line51"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_initializeProfile</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line52"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_initializeBaseEntropy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line53"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_initializeBasePasswordPolicy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line54"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line55"><pre><span class="token T_WHITESPACE">	</span></pre></div><div id="line56"><pre><span class="token T_WHITESPACE">   </span><span class="token T_DOC_COMMENT">/** </span></pre></div><div id="line57"><pre><span class="token T_DOC_COMMENT">    * initializes the user profiles data as per the user credentials provided to the constructor method</span></pre></div><div id="line58"><pre><span class="token T_DOC_COMMENT">    * </span></pre></div><div id="line59"><pre><span class="token T_DOC_COMMENT">    * Cyril Ogana &lt;cogana@gmail.com&gt; - 2015-07-18</span></pre></div><div id="line60"><pre><span class="token T_DOC_COMMENT">    *</span></pre></div><div id="line61"><pre><span class="token T_DOC_COMMENT">    * @param  array / ArrayAccess  $userProfile</span></pre></div><div id="line62"><pre><span class="token T_DOC_COMMENT">    *</span></pre></div><div id="line63"><pre><span class="token T_DOC_COMMENT">    * @access private</span></pre></div><div id="line64"><pre><span class="token T_DOC_COMMENT">    */</span></pre></div><div id="line65"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PRIVATE">private</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_initializeProfile</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line66"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that user profile has the correct information</span></pre></div><div id="line67"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line68"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'username'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line69"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line70"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'fullname'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE">			</span></pre></div><div id="line71"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'passhash'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line72"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_string</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'passhash'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line73"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'passhist'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line74"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'passhist'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line75"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'account_state'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line76"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'policyinfo'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line77"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'policyinfo'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line78"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line79"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The user profile is not properly initialized'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1000</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line80"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line81"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$userProfile</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line82"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line83"><br/></div><div id="line84"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line85"><pre><span class="token T_DOC_COMMENT">     * Initialize entopy requirements to recommended default base entropy  as per OWASP</span></pre></div><div id="line86"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line87"><pre><span class="token T_DOC_COMMENT">     * 2015-07-18</span></pre></div><div id="line88"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line89"><pre><span class="token T_DOC_COMMENT">     * @access private</span></pre></div><div id="line90"><pre><span class="token T_DOC_COMMENT">     */</span><span class="token T_WHITESPACE"> 	</span></pre></div><div id="line91"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PRIVATE">private</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_initializeBaseEntropy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line92"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//initialize if not already initialized as array</span></pre></div><div id="line93"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropySetting</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line94"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropySetting</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_ARRAY">array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line95"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line96"><br/></div><div id="line97"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropySetting</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_pass_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">8</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">    </span><span class="token T_COMMENT">//minimum password length</span></pre></div><div id="line98"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropySetting</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'max_consecutive_chars'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">2</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">    </span><span class="token T_COMMENT">//minimum characters to repeat consecutively</span></pre></div><div id="line99"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropySetting</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'uppercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_ARRAY">array</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_WHITESPACE">     </span><span class="token T_COMMENT">//requirement and length for various character types</span></pre></div><div id="line100"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_WHITESPACE">  </span><span class="token T_DOUBLE_ARROW">=&gt;</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_COMMA">,</span></pre></div><div id="line101"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_WHITESPACE"> </span><span class="token T_DOUBLE_ARROW">=&gt;</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">2</span></pre></div><div id="line102"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line103"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropySetting</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'numeric'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_ARRAY">array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span></pre></div><div id="line104"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_WHITESPACE">  </span><span class="token T_DOUBLE_ARROW">=&gt;</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_COMMA">,</span></pre></div><div id="line105"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_WHITESPACE"> </span><span class="token T_DOUBLE_ARROW">=&gt;</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1</span><span class="token T_WHITESPACE">														</span></pre></div><div id="line106"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line107"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropySetting</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'lowercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_ARRAY">array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span></pre></div><div id="line108"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_WHITESPACE">  </span><span class="token T_DOUBLE_ARROW">=&gt;</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_COMMA">,</span></pre></div><div id="line109"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_WHITESPACE"> </span><span class="token T_DOUBLE_ARROW">=&gt;</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">2</span></pre></div><div id="line110"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line111"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropySetting</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'special'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_ARRAY">array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span></pre></div><div id="line112"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_WHITESPACE">  </span><span class="token T_DOUBLE_ARROW">=&gt;</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_COMMA">,</span></pre></div><div id="line113"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_WHITESPACE"> </span><span class="token T_DOUBLE_ARROW">=&gt;</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1</span></pre></div><div id="line114"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line115"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropyOverride</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">false</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">    </span><span class="token T_COMMENT">//override the reommended settings?</span></pre></div><div id="line116"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_setUdfEntropy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropySetting</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line117"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line118"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line119"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line120"><pre><span class="token T_DOC_COMMENT">     * Initialize policy requirements to recommended default base entropy  as per OWASP</span></pre></div><div id="line121"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line122"><pre><span class="token T_DOC_COMMENT">     * 2014-02-11</span></pre></div><div id="line123"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line124"><pre><span class="token T_DOC_COMMENT">     * @access private</span></pre></div><div id="line125"><pre><span class="token T_DOC_COMMENT">     */</span><span class="token T_WHITESPACE"> 	</span></pre></div><div id="line126"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PRIVATE">private</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_initializeBasePasswordPolicy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line127"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_basePasswordPolicy</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_limit'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">3</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE"> </span><span class="token T_COMMENT">//count</span></pre></div><div id="line128"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_basePasswordPolicy</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_reset_frequency'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">45</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE"> </span><span class="token T_COMMENT">//days</span></pre></div><div id="line129"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_basePasswordPolicy</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_repeat_minimum'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">5</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE"> </span><span class="token T_COMMENT">//count</span></pre></div><div id="line130"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_basePasswordPolicy</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_penalty_seconds'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">600</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE"> </span><span class="token T_COMMENT">//seconds</span></pre></div><div id="line131"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_setUdfPasswordPolicy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_basePasswordPolicy</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line132"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line133"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line134"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line135"><pre><span class="token T_DOC_COMMENT">     * Get the base entropy data structure</span></pre></div><div id="line136"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line137"><pre><span class="token T_DOC_COMMENT">     * 2015-07-18</span></pre></div><div id="line138"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line139"><pre><span class="token T_DOC_COMMENT">     * @return array / Object</span></pre></div><div id="line140"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line141"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line142"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line143"><pre><span class="token T_DOC_COMMENT">     */</span></pre></div><div id="line144"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_getBaseEntropy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line145"><pre><span class="token T_WHITESPACE">	</span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropySetting</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line146"><pre><span class="token T_WHITESPACE">            </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropySetting</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line147"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line148"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line149"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line150"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line151"><pre><span class="token T_DOC_COMMENT">     *  Get the base password policy</span></pre></div><div id="line152"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line153"><pre><span class="token T_DOC_COMMENT">     * 2015-07-18</span></pre></div><div id="line154"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line155"><pre><span class="token T_DOC_COMMENT">     * @return array / Object</span></pre></div><div id="line156"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line157"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line158"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line159"><pre><span class="token T_DOC_COMMENT">     */</span></pre></div><div id="line160"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_getBasePasswordPolicy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line161"><pre><span class="token T_WHITESPACE">	</span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_basePasswordPolicy</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line162"><pre><span class="token T_WHITESPACE">            </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_basePasswordPolicy</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line163"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line164"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_WHITESPACE">  </span></pre></div><div id="line165"><br/></div><div id="line166"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line167"><pre><span class="token T_DOC_COMMENT">     * Set the user defined entropy setting</span></pre></div><div id="line168"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line169"><pre><span class="token T_DOC_COMMENT">     * 2015-07-18</span></pre></div><div id="line170"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line171"><pre><span class="token T_DOC_COMMENT">     * @param  array / object entropyObj - array or object implementing ArrayAccess</span></pre></div><div id="line172"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line173"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line174"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line175"><pre><span class="token T_DOC_COMMENT">     */</span><span class="token T_WHITESPACE"> </span></pre></div><div id="line176"><pre><span class="token T_WHITESPACE">     </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_setUdfEntropy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line177"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//initialize if not already initialized as array</span></pre></div><div id="line178"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line179"><pre><span class="token T_WHITESPACE">           </span><span class="token T_BOOLEAN_OR">||</span></pre></div><div id="line180"><pre><span class="token T_WHITESPACE">           </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_object</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line181"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_AND">&amp;&amp;</span></pre></div><div id="line182"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_WHITESPACE"> </span><span class="token T_INSTANCEOF">instanceof</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">ArrayAccess</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line183"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line184"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_ARRAY">array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line185"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line186"><br/></div><div id="line187"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate the array / object</span></pre></div><div id="line188"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line189"><pre><span class="token T_WHITESPACE">            </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_object</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line190"><pre><span class="token T_WHITESPACE">                </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_WHITESPACE"> </span><span class="token T_INSTANCEOF">instanceof</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">ArrayAccess</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line191"><pre><span class="token T_WHITESPACE">            </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line192"><pre><span class="token T_WHITESPACE">                </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The entropy object should be an array or implement ArrayAccess interface'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1001</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line193"><pre><span class="token T_WHITESPACE">            </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line194"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line195"><br/></div><div id="line196"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that minimum password len has the correct indices, then set it</span></pre></div><div id="line197"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_pass_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line198"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_int</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_pass_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span></pre></div><div id="line199"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line200"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The minimum password length hasn\'t been set'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1002</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line201"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line202"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_pass_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_pass_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line203"><br/></div><div id="line204"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that minimum allowed password characters to repeat has been set</span></pre></div><div id="line205"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'max_consecutive_chars'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line206"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_int</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'max_consecutive_chars'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line207"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line208"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The minimum allowed consecutive character repetition hasn\'t been set'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1003</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line209"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line210"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line211"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'max_consecutive_chars'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE">  </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'max_consecutive_chars'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line212"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line213"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that uppercase snippet has correct indices, then set it</span></pre></div><div id="line214"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'uppercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line215"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'uppercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line216"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'uppercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line217"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_bool</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'uppercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line218"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'uppercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line219"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_int</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'uppercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line220"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line221"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The uppercase settings must be an array containing toggle and min upper length'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1004</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line222"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line223"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'uppercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'uppercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line224"><br/></div><div id="line225"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that lowercase snippet has correct indices, then set it</span></pre></div><div id="line226"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'lowercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line227"><pre><span class="token T_WHITESPACE">           </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'lowercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line228"><pre><span class="token T_WHITESPACE">           </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'lowercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line229"><pre><span class="token T_WHITESPACE">           </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_bool</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'lowercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line230"><pre><span class="token T_WHITESPACE">           </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'lowercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line231"><pre><span class="token T_WHITESPACE">           </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_int</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'lowercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line232"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line233"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The lowercase settings must be an array containing toggle and min lower length'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1005</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line234"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line235"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'lowercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'lowercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line236"><br/></div><div id="line237"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that numeric chars snippet has correct indices, then set it</span></pre></div><div id="line238"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'numeric'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line239"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'numeric'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line240"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'numeric'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line241"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_bool</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'numeric'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line242"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'numeric'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line243"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_int</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'numeric'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line244"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line245"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The numeric settings must be an array containing toggle and min lower length'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1006</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line246"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line247"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'numeric'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'numeric'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line248"><br/></div><div id="line249"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that special chars snippet has correct indices, then set it</span></pre></div><div id="line250"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'special'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line251"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'special'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line252"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'special'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line253"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_bool</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'special'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line254"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'special'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line255"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_int</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'special'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line256"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line257"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'the uppercase settings must be an array containing toggle and min upper length'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1007</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line258"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line259"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'special'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'special'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line260"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line261"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line262"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line263"><pre><span class="token T_DOC_COMMENT">     * Set the user defined password policy</span></pre></div><div id="line264"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line265"><pre><span class="token T_DOC_COMMENT">     * 2015-07-18</span></pre></div><div id="line266"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line267"><pre><span class="token T_DOC_COMMENT">     * @param  array / object entropyObj - array or object implementing ArrayAccess</span></pre></div><div id="line268"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line269"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line270"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line271"><pre><span class="token T_DOC_COMMENT">     */</span><span class="token T_WHITESPACE"> </span></pre></div><div id="line272"><pre><span class="token T_WHITESPACE">     </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_setUdfPasswordPolicy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line273"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//initialize if not already initialized as array</span></pre></div><div id="line274"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfPasswordPolicy</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line275"><pre><span class="token T_WHITESPACE">           </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span></pre></div><div id="line276"><pre><span class="token T_WHITESPACE">           </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_object</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfPasswordPolicy</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line277"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_AND">&amp;&amp;</span></pre></div><div id="line278"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfPasswordPolicy</span><span class="token T_WHITESPACE"> </span><span class="token T_INSTANCEOF">instanceof</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">ArrayAccess</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line279"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line280"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfPasswordPolicy</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_ARRAY">array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line281"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line282"><br/></div><div id="line283"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate the array / object</span></pre></div><div id="line284"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line285"><pre><span class="token T_WHITESPACE">            </span><span class="token T_IF">if</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_object</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line286"><pre><span class="token T_WHITESPACE">                </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_WHITESPACE"> </span><span class="token T_INSTANCEOF">instanceof</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">ArrayAccess</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line287"><pre><span class="token T_WHITESPACE">            </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line288"><pre><span class="token T_WHITESPACE">                </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The entropy object should be an array or implement ArrayAccess interface'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1008</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line289"><pre><span class="token T_WHITESPACE">            </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line290"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line291"><br/></div><div id="line292"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that illegal attempts limit has correct indices, then set it</span></pre></div><div id="line293"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_limit'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line294"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_int</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_limit'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line295"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line296"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The illegal attempts limit hasn\'t been set'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1009</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line297"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line298"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfPasswordPolicy</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_limit'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_limit'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line299"><br/></div><div id="line300"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that password reset frequency has correct indices, then set it</span></pre></div><div id="line301"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_reset_frequency'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line302"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_int</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_reset_frequency'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span></pre></div><div id="line303"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line304"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The password reset frequency hasn\'t been set'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1010</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line305"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line306"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfPasswordPolicy</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_reset_frequency'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_reset_frequency'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line307"><br/></div><div id="line308"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that passwordd repeat minimum has correct indices, then set it</span></pre></div><div id="line309"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_repeat_minimum'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line310"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_int</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_repeat_minimum'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span></pre></div><div id="line311"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line312"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The password repeat minimum has not been set'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1011</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line313"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line314"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfPasswordPolicy</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_repeat_minimum'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_repeat_minimum'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line315"><br/></div><div id="line316"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that password repeat minimum has correct indices, then set it</span></pre></div><div id="line317"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_penalty_seconds'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line318"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_STRING">is_int</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_penalty_seconds'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span></pre></div><div id="line319"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line320"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The illegal attempts penalty seconds has not been set'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1012</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line321"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line322"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfPasswordPolicy</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_penalty_seconds'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_penalty_seconds'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line323"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line324"><pre><span class="token T_WHITESPACE">	</span></pre></div><div id="line325"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line326"><pre><span class="token T_DOC_COMMENT">     * Get the udf entropy data structure</span></pre></div><div id="line327"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line328"><pre><span class="token T_DOC_COMMENT">     * 2015-07-18</span></pre></div><div id="line329"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line330"><pre><span class="token T_DOC_COMMENT">     * @return array / Object</span></pre></div><div id="line331"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line332"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line333"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line334"><pre><span class="token T_DOC_COMMENT">     */</span></pre></div><div id="line335"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_getUdfEntropy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line336"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line337"><pre><span class="token T_WHITESPACE">            </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line338"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line339"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line340"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line341"><pre><span class="token T_WHITESPACE">     </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line342"><pre><span class="token T_DOC_COMMENT">     * Get the udf password policy</span></pre></div><div id="line343"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line344"><pre><span class="token T_DOC_COMMENT">     * 2015-07-18</span></pre></div><div id="line345"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line346"><pre><span class="token T_DOC_COMMENT">     * @return array / Object</span></pre></div><div id="line347"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line348"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line349"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line350"><pre><span class="token T_DOC_COMMENT">     */</span></pre></div><div id="line351"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_getUdfPasswordPolicy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line352"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfPasswordPolicy</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line353"><pre><span class="token T_WHITESPACE">            </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfPasswordPolicy</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line354"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line355"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_WHITESPACE">  </span></pre></div><div id="line356"><pre><span class="token T_WHITESPACE">	</span></pre></div><div id="line357"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line358"><pre><span class="token T_DOC_COMMENT">     * Set the value of base entropy toggle flag</span></pre></div><div id="line359"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line360"><pre><span class="token T_DOC_COMMENT">     * 2015-07-18</span></pre></div><div id="line361"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line362"><pre><span class="token T_DOC_COMMENT">     * @param True or false to toggle the attribute</span></pre></div><div id="line363"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line364"><pre><span class="token T_DOC_COMMENT">     * @return void</span></pre></div><div id="line365"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line366"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line367"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line368"><pre><span class="token T_DOC_COMMENT">     */</span></pre></div><div id="line369"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_setBaseEntropyOverride</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$toggle</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line370"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropyOverride</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line371"><pre><span class="token T_WHITESPACE">           </span><span class="token T_BOOLEAN_AND">&amp;&amp;</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">is_bool</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$toggle</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line372"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line373"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropyOverride</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$toggle</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">   </span></pre></div><div id="line374"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line375"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line376"><br/></div><div id="line377"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line378"><pre><span class="token T_DOC_COMMENT">     * Get the current value of base entropy override attrib</span></pre></div><div id="line379"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line380"><pre><span class="token T_DOC_COMMENT">     * 2013-07-18</span></pre></div><div id="line381"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line382"><pre><span class="token T_DOC_COMMENT">     * @return bool</span></pre></div><div id="line383"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line384"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line385"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line386"><pre><span class="token T_DOC_COMMENT">     */</span></pre></div><div id="line387"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_getBaseEntropyOverride</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line388"><pre><span class="token T_WHITESPACE">	</span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropyOverride</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line389"><pre><span class="token T_WHITESPACE">            </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_baseEntropyOverride</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line390"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line391"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line392"><pre><span class="token T_WHITESPACE">	</span></pre></div><div id="line393"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line394"><pre><span class="token T_DOC_COMMENT">     * build simple regex patterns based on particular entropy settings</span></pre></div><div id="line395"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line396"><pre><span class="token T_DOC_COMMENT">     * 2015-07-18</span></pre></div><div id="line397"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line398"><pre><span class="token T_DOC_COMMENT">     * @param  int patternCode - integer representing defined constants for variable code</span></pre></div><div id="line399"><pre><span class="token T_DOC_COMMENT">     * @param  int matchCount  - integer representing the count of matched transactions</span></pre></div><div id="line400"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line401"><pre><span class="token T_DOC_COMMENT">     * @return string</span></pre></div><div id="line402"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line403"><pre><span class="token T_DOC_COMMENT">     * @access private</span></pre></div><div id="line404"><pre><span class="token T_DOC_COMMENT">     */</span><span class="token T_WHITESPACE">	</span></pre></div><div id="line405"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PRIVATE">private</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_regexBuildPattern</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$patternCode</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$matchCount</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line406"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$patternRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">''</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line407"><br/></div><div id="line408"><pre><span class="token T_WHITESPACE">        </span><span class="token T_SWITCH">switch</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$patternCode</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line409"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CASE">case</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1</span><span class="token T_PHPDOX_COLON">:</span></pre></div><div id="line410"><pre><span class="token T_WHITESPACE">                </span><span class="token T_VARIABLE">$patternRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_ENCAPSED_AND_WHITESPACE">(?=(?:.*[A-Z]){</span><span class="token T_CURLY_OPEN">{</span><span class="token T_VARIABLE">$matchCount</span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_ENCAPSED_AND_WHITESPACE">})</span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line411"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BREAK">break</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line412"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CASE">case</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">2</span><span class="token T_PHPDOX_COLON">:</span></pre></div><div id="line413"><pre><span class="token T_WHITESPACE">                </span><span class="token T_VARIABLE">$patternRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_ENCAPSED_AND_WHITESPACE">(?=(?:.*[a-z]){</span><span class="token T_CURLY_OPEN">{</span><span class="token T_VARIABLE">$matchCount</span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_ENCAPSED_AND_WHITESPACE">})</span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line414"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BREAK">break</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line415"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CASE">case</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">3</span><span class="token T_PHPDOX_COLON">:</span></pre></div><div id="line416"><pre><span class="token T_WHITESPACE">                </span><span class="token T_VARIABLE">$patternRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_ENCAPSED_AND_WHITESPACE">(?=(?:.*[0-9]){</span><span class="token T_CURLY_OPEN">{</span><span class="token T_VARIABLE">$matchCount</span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_ENCAPSED_AND_WHITESPACE">})</span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line417"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BREAK">break</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line418"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CASE">case</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">4</span><span class="token T_PHPDOX_COLON">:</span></pre></div><div id="line419"><pre><span class="token T_WHITESPACE">                </span><span class="token T_VARIABLE">$patternRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'(?=(?:.*([-@%+\/\'!#$^*?:.)(}{\[\]~_])){'</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_VARIABLE">$matchCount</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_CONSTANT_ENCAPSED_STRING">'})'</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line420"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BREAK">break</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line421"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CASE">case</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">5</span><span class="token T_PHPDOX_COLON">:</span></pre></div><div id="line422"><pre><span class="token T_WHITESPACE">                </span><span class="token T_VARIABLE">$patternRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'((.)\2}?(\2{'</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_VARIABLE">$matchCount</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_CONSTANT_ENCAPSED_STRING">'}))'</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line423"><pre><span class="token T_WHITESPACE">            </span><span class="token T_DEFAULT">default</span><span class="token T_PHPDOX_COLON">:</span></pre></div><div id="line424"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BREAK">break</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line425"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line426"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$patternRegex</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line427"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The regex pattern is not set'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1013</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line428"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line429"><br/></div><div id="line430"><pre><span class="token T_WHITESPACE">        </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$patternRegex</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line431"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line432"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line433"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line434"><pre><span class="token T_DOC_COMMENT">    * Get a description of the required password entropy</span></pre></div><div id="line435"><pre><span class="token T_DOC_COMMENT">    * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line436"><pre><span class="token T_DOC_COMMENT">    * 2015-07-18</span></pre></div><div id="line437"><pre><span class="token T_DOC_COMMENT">    *    </span></pre></div><div id="line438"><pre><span class="token T_DOC_COMMENT">    * @return string</span></pre></div><div id="line439"><pre><span class="token T_DOC_COMMENT">    *</span></pre></div><div id="line440"><pre><span class="token T_DOC_COMMENT">    * @access protected</span></pre></div><div id="line441"><pre><span class="token T_DOC_COMMENT">    * @final</span></pre></div><div id="line442"><pre><span class="token T_DOC_COMMENT">    */</span><span class="token T_WHITESPACE">	</span></pre></div><div id="line443"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE">  </span><span class="token T_STRING">_getPasswordEntropyDescription</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line444"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_getUdfEntropy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line445"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line446"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$description</span><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'The password entropy requires at minimum, the following: '</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line447"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$hasEntropy</span><span class="token T_WHITESPACE">     </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">false</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line448"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$isFirstEntropy</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">false</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line449"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$concatenator</span><span class="token T_WHITESPACE">   </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">''</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line450"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line451"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'lowercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line452"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$lowercaseLen</span><span class="token T_WHITESPACE">   </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'lowercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line453"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$description</span><span class="token T_WHITESPACE">   </span><span class="token T_CONCAT_EQUAL">.=</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_ENCAPSED_AND_WHITESPACE"> at least </span><span class="token T_VARIABLE">$lowercaseLen</span><span class="token T_ENCAPSED_AND_WHITESPACE"> lowercase characters</span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line454"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$hasEntropy</span><span class="token T_WHITESPACE">     </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line455"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$isFirstEntropy</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line456"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line457"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line458"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'uppercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line459"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$isFirstEntropy</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$isFirstEntropy</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_QUESTION_MARK">?</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">false</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_COLON">:</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line460"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$concatenator</span><span class="token T_WHITESPACE">   </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$isFirstEntropy</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_QUESTION_MARK">?</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">''</span><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_COLON">:</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">','</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line461"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$uppercaseLen</span><span class="token T_WHITESPACE">   </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'uppercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line462"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$description</span><span class="token T_WHITESPACE">   </span><span class="token T_CONCAT_EQUAL">.=</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_VARIABLE">$concatenator</span><span class="token T_ENCAPSED_AND_WHITESPACE"> at least </span><span class="token T_VARIABLE">$uppercaseLen</span><span class="token T_ENCAPSED_AND_WHITESPACE"> uppercase characters</span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line463"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$hasEntropy</span><span class="token T_WHITESPACE">     </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">     </span></pre></div><div id="line464"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line465"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line466"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'numeric'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line467"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$isFirstEntropy</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$isFirstEntropy</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_QUESTION_MARK">?</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">false</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_COLON">:</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line468"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$concatenator</span><span class="token T_WHITESPACE">   </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$isFirstEntropy</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_QUESTION_MARK">?</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">''</span><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_COLON">:</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">','</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line469"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$numericLen</span><span class="token T_WHITESPACE">     </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'numeric'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line470"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$description</span><span class="token T_WHITESPACE">   </span><span class="token T_CONCAT_EQUAL">.=</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_VARIABLE">$concatenator</span><span class="token T_ENCAPSED_AND_WHITESPACE"> at least </span><span class="token T_VARIABLE">$numericLen</span><span class="token T_ENCAPSED_AND_WHITESPACE"> numeric characters</span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line471"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$hasEntropy</span><span class="token T_WHITESPACE">     </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">     </span></pre></div><div id="line472"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line473"><br/></div><div id="line474"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'special'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line475"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$isFirstEntropy</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$isFirstEntropy</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_QUESTION_MARK">?</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">false</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_COLON">:</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line476"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$concatenator</span><span class="token T_WHITESPACE">   </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$isFirstEntropy</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_QUESTION_MARK">?</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">''</span><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_COLON">:</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">','</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line477"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$specialLen</span><span class="token T_WHITESPACE">     </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'special'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line478"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$description</span><span class="token T_WHITESPACE">   </span><span class="token T_CONCAT_EQUAL">.=</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_VARIABLE">$concatenator</span><span class="token T_ENCAPSED_AND_WHITESPACE"> at least </span><span class="token T_VARIABLE">$specialLen</span><span class="token T_ENCAPSED_AND_WHITESPACE"> special characters</span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line479"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$hasEntropy</span><span class="token T_WHITESPACE">     </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">     </span></pre></div><div id="line480"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line481"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line482"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_VARIABLE">$hasEntropy</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line483"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$description</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'There is no minimum password entropy policy in place'</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line484"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line485"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line486"><pre><span class="token T_WHITESPACE">        </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$description</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line487"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line488"><br/></div><div id="line489"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line490"><pre><span class="token T_DOC_COMMENT">    * Get a description of the required password entropy</span></pre></div><div id="line491"><pre><span class="token T_DOC_COMMENT">    * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line492"><pre><span class="token T_DOC_COMMENT">    * 2015-07-18</span></pre></div><div id="line493"><pre><span class="token T_DOC_COMMENT">    *    </span></pre></div><div id="line494"><pre><span class="token T_DOC_COMMENT">    * @return string</span></pre></div><div id="line495"><pre><span class="token T_DOC_COMMENT">    *</span></pre></div><div id="line496"><pre><span class="token T_DOC_COMMENT">    * @access protected</span></pre></div><div id="line497"><pre><span class="token T_DOC_COMMENT">    * @final</span></pre></div><div id="line498"><pre><span class="token T_DOC_COMMENT">    */</span><span class="token T_WHITESPACE">    </span></pre></div><div id="line499"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_getPasswordLengthDescription</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line500"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_getUdfEntropy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line501"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line502"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_pass_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line503"><pre><span class="token T_WHITESPACE">            </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_ENCAPSED_AND_WHITESPACE">The minimum password length is </span><span class="token T_CURLY_OPEN">{</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_pass_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_ENCAPSED_AND_WHITESPACE"> characters</span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line504"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_WHITESPACE"> </span><span class="token T_ELSE">else</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line505"><pre><span class="token T_WHITESPACE">            </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'There is no minimum password length policy in place'</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line506"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line507"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line508"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line509"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line510"><pre><span class="token T_DOC_COMMENT">     * Get a description for the entropy policy regarding repeating a character consecutively</span></pre></div><div id="line511"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana&lt;cogana@gmail.com&gt;</span></pre></div><div id="line512"><pre><span class="token T_DOC_COMMENT">     * 2015-07-18</span></pre></div><div id="line513"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line514"><pre><span class="token T_DOC_COMMENT">     * @return string</span></pre></div><div id="line515"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line516"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line517"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line518"><pre><span class="token T_DOC_COMMENT">     */</span></pre></div><div id="line519"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_getPasswordCharacterRepeatDescription</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line520"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_getUdfEntropy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line521"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line522"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'max_consecutive_chars'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line523"><pre><span class="token T_WHITESPACE">            </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_ENCAPSED_AND_WHITESPACE">The maximum allowed number of repeated characters in password of same type (e.g. aaa) is </span><span class="token T_CURLY_OPEN">{</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'max_consecutive_chars'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_PHPDOX_DOUBLE_QUOTES">"</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line524"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_WHITESPACE"> </span><span class="token T_ELSE">else</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line525"><pre><span class="token T_WHITESPACE">            </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">"There is no maximum allowed number of repeated characters in password of the same type (e.g. aaa)"</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line526"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line527"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line528"><br/></div><div id="line529"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line530"><pre><span class="token T_DOC_COMMENT">    * Get a description of the required password policy</span></pre></div><div id="line531"><pre><span class="token T_DOC_COMMENT">    * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line532"><pre><span class="token T_DOC_COMMENT">    * 2015-07-18</span></pre></div><div id="line533"><pre><span class="token T_DOC_COMMENT">    *    </span></pre></div><div id="line534"><pre><span class="token T_DOC_COMMENT">    * @return string</span></pre></div><div id="line535"><pre><span class="token T_DOC_COMMENT">    *</span></pre></div><div id="line536"><pre><span class="token T_DOC_COMMENT">    * @access protected</span></pre></div><div id="line537"><pre><span class="token T_DOC_COMMENT">    * @final</span></pre></div><div id="line538"><pre><span class="token T_DOC_COMMENT">    */</span><span class="token T_WHITESPACE">        </span></pre></div><div id="line539"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_getPasswordPolicyDescription</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$policyType</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line540"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$policyObj</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_getUdfPasswordPolicy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line541"><br/></div><div id="line542"><pre><span class="token T_WHITESPACE">        </span><span class="token T_SWITCH">switch</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$policyType</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line543"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CASE">case</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_limit'</span><span class="token T_PHPDOX_COLON">:</span></pre></div><div id="line544"><pre><span class="token T_WHITESPACE">                </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_limit'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line545"><pre><span class="token T_WHITESPACE">                    </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'The illegal login attempts limit is '</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_limit'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line546"><pre><span class="token T_WHITESPACE">                </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line547"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BREAK">break</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line548"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CASE">case</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_reset_frequency'</span><span class="token T_PHPDOX_COLON">:</span></pre></div><div id="line549"><pre><span class="token T_WHITESPACE">                </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_reset_frequency'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line550"><pre><span class="token T_WHITESPACE">                    </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'The password reset frequency is '</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_reset_frequency'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_CONSTANT_ENCAPSED_STRING">' days'</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line551"><pre><span class="token T_WHITESPACE">                </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line552"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BREAK">break</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line553"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CASE">case</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_repeat_minimum'</span><span class="token T_PHPDOX_COLON">:</span></pre></div><div id="line554"><pre><span class="token T_WHITESPACE">                </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_repeat_minimum'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line555"><pre><span class="token T_WHITESPACE">                    </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'A user is not allowed to repeat any of their last '</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_repeat_minimum'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_CONSTANT_ENCAPSED_STRING">' passwords'</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line556"><pre><span class="token T_WHITESPACE">                </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line557"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BREAK">break</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line558"><pre><span class="token T_WHITESPACE">            </span><span class="token T_CASE">case</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_penalty_seconds'</span><span class="token T_PHPDOX_COLON">:</span></pre></div><div id="line559"><pre><span class="token T_WHITESPACE">                </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_penalty_seconds'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line560"><pre><span class="token T_WHITESPACE">                    </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'A user account will be temporarily locked out after the illegal login attempts limit for '</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_penalty_seconds'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_CONSTANT_ENCAPSED_STRING">' seconds; and will require admin intervention if the offense is repeated'</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line561"><pre><span class="token T_WHITESPACE">                </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line562"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BREAK">break</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line563"><pre><span class="token T_WHITESPACE">            </span><span class="token T_DEFAULT">default</span><span class="token T_PHPDOX_COLON">:</span></pre></div><div id="line564"><pre><span class="token T_WHITESPACE">            </span></pre></div><div id="line565"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BREAK">break</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line566"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line567"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line568"><pre><span class="token T_WHITESPACE"> </span></pre></div><div id="line569"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line570"><pre><span class="token T_DOC_COMMENT">     * validate the entropy of the password in the userprofile</span></pre></div><div id="line571"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line572"><pre><span class="token T_DOC_COMMENT">     * 2018-07-18</span></pre></div><div id="line573"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line574"><pre><span class="token T_DOC_COMMENT">     * @return bool</span></pre></div><div id="line575"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line576"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line577"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line578"><pre><span class="token T_DOC_COMMENT">     */</span></pre></div><div id="line579"><pre><span class="token T_WHITESPACE">     </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_validateEntropy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line580"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that required indices exist</span></pre></div><div id="line581"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'username'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line582"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line583"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'fullname'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line584"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'passhist'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line585"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line586"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">Exception</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The username and password are not set'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1014</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line587"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line588"><br/></div><div id="line589"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that user is not using part of username as password</span></pre></div><div id="line590"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$namePartsArr</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_ARRAY">array</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line591"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$namePartsArr</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">strtolower</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'username'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line592"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$namePartsArr</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">strtolower</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'fullname'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line593"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$namePartsArr</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">strtolower</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_STRING">str_replace</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">' '</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">''</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'fullname'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line594"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line595"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$fullNameExploded</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">explode</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">' '</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'fullname'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line596"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line597"><pre><span class="token T_WHITESPACE">        </span><span class="token T_FOREACH">foreach</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$fullNameExploded</span><span class="token T_WHITESPACE"> </span><span class="token T_AS">as</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$nameItem</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line598"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$namePartsArr</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">strtolower</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$nameItem</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line599"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line600"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line601"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//iterate and search for occurrences of name parts</span></pre></div><div id="line602"><pre><span class="token T_WHITESPACE">        </span><span class="token T_FOREACH">foreach</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$namePartsArr</span><span class="token T_WHITESPACE"> </span><span class="token T_AS">as</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$namePart</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line603"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$namePartCast</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING_CAST">(string)</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$namePart</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line604"><pre><span class="token T_WHITESPACE">            </span></pre></div><div id="line605"><pre><span class="token T_WHITESPACE">            </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_STRING">strpos</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_STRING">strtolower</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$namePartCast</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_NOT_IDENTICAL">!==</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">false</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line606"><pre><span class="token T_WHITESPACE">                </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'Password cannot contain username or any of your names'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">USERCREDENTIAL_ACCOUNTPOLICY_NAMEINPASSWD</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line607"><pre><span class="token T_WHITESPACE">            </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line608"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line609"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//set which entropy to use (base or udf)</span></pre></div><div id="line610"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line611"><br/></div><div id="line612"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$validateCaseRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">''</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line613"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$upperCaseRegex</span><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">''</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line614"><br/></div><div id="line615"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//build the password entropy regex uppercase</span></pre></div><div id="line616"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'uppercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line617"><pre><span class="token T_WHITESPACE">            </span><span class="token T_COMMENT">//@TODO: Implement as constants the patterns</span></pre></div><div id="line618"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$pattern</span><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line619"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$matchCount</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'uppercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_QUESTION_MARK">?</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'uppercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_COLON">:</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line620"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$upperCaseRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_regexBuildPattern</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$pattern</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$matchCount</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line621"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line622"><br/></div><div id="line623"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$lowerCaseRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">''</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line624"><br/></div><div id="line625"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//build the password entropy regex lowercase</span></pre></div><div id="line626"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'lowercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line627"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$pattern</span><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">2</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line628"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$matchCount</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'lowercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_QUESTION_MARK">?</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'lowercase'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_COLON">:</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line629"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$lowerCaseRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_regexBuildPattern</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$pattern</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_VARIABLE">$matchCount</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line630"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line631"><br/></div><div id="line632"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$numericRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">''</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line633"><br/></div><div id="line634"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//build the password entropy regex numbers</span></pre></div><div id="line635"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'numeric'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line636"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$pattern</span><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">3</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line637"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$matchCount</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'numeric'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_QUESTION_MARK">?</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'numeric'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_COLON">:</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line638"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$numericRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_regexBuildPattern</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$pattern</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$matchCount</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line639"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line640"><br/></div><div id="line641"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$specialRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">''</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line642"><br/></div><div id="line643"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//build the password entropy regex special</span></pre></div><div id="line644"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'special'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'toggle'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line645"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$pattern</span><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">4</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line646"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$matchCount</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'special'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_QUESTION_MARK">?</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'special'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_COLON">:</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line647"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$specialRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_regexBuildPattern</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$pattern</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$matchCount</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line648"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line649"><br/></div><div id="line650"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//regex entropy string</span></pre></div><div id="line651"><br/></div><div id="line652"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$validateCaseRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'/^'</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_VARIABLE">$upperCaseRegex</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_VARIABLE">$lowerCaseRegex</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_VARIABLE">$numericRegex</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_VARIABLE">$specialRegex</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_CONSTANT_ENCAPSED_STRING">'/'</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line653"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$testVal</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">preg_match</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$validateCaseRegex</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line654"><br/></div><div id="line655"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$testVal</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_IDENTICAL">===</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">false</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line656"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'A fatal error occured in the password validation'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1015</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line657"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_WHITESPACE"> </span><span class="token T_ELSEIF">elseif</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$testVal</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">false</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line658"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The password does not meet the minimum entropy. '</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_getPasswordEntropyDescription</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">USERCREDENTIAL_ACCOUNTPOLICY_WEAKPASSWD</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line659"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_WHITESPACE"> </span><span class="token T_ELSE">else</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line660"><pre><span class="token T_WHITESPACE">            </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line661"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line662"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line663"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line664"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line665"><pre><span class="token T_DOC_COMMENT">     * validate the password length of the users credentials</span></pre></div><div id="line666"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line667"><pre><span class="token T_DOC_COMMENT">     * 2018-07-18</span></pre></div><div id="line668"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line669"><pre><span class="token T_DOC_COMMENT">     * @return bool</span></pre></div><div id="line670"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line671"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line672"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line673"><pre><span class="token T_DOC_COMMENT">     */</span><span class="token T_WHITESPACE">    </span></pre></div><div id="line674"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_validateLength</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line675"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that required indices exist</span></pre></div><div id="line676"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'username'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line677"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line678"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'fullname'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line679"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'passhist'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line680"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line681"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">Exception</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The username and password are not set'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1016</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line682"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line683"><br/></div><div id="line684"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//determine which entropy to use (base or udf)</span></pre></div><div id="line685"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line686"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line687"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//perform length check</span></pre></div><div id="line688"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_STRING">strlen</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_LT">&lt;</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'min_pass_len'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line689"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The password does not meet required length. '</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_getPasswordLengthDescription</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">USERCREDENTIAL_ACCOUNTPOLICY_WEAKPASSWD</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line690"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line691"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line692"><pre><span class="token T_WHITESPACE">        </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line693"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line694"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line695"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line696"><pre><span class="token T_DOC_COMMENT">     * validate that there are no instances of consecutive character repetitions beyond allowed number</span></pre></div><div id="line697"><pre><span class="token T_DOC_COMMENT">     * in the users password string</span></pre></div><div id="line698"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line699"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line700"><pre><span class="token T_DOC_COMMENT">     * 2018-07-18</span></pre></div><div id="line701"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line702"><pre><span class="token T_DOC_COMMENT">     * @return bool</span></pre></div><div id="line703"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line704"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line705"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line706"><pre><span class="token T_DOC_COMMENT">     */</span><span class="token T_WHITESPACE">      </span></pre></div><div id="line707"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_validateConsecutiveCharacterRepeat</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line708"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that required indices exist</span></pre></div><div id="line709"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'username'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line710"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line711"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'fullname'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line712"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'passhist'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line713"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line714"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">Exception</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The username and password are not set'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1017</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line715"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line716"><br/></div><div id="line717"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//determine which entropy to use (base or udf)</span></pre></div><div id="line718"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfEntropySetting</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line719"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$maxConsecutiveChars</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_INT_CAST">(int)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'max_consecutive_chars'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line720"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line721"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//because we offset by -2 when doing regex, if the limit is not greater or equal to 2, default to 2</span></pre></div><div id="line722"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$maxConsecutiveChars</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_GREATER_OR_EQUAL">&gt;=</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">2</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line723"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$maxConsecutiveChars</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">2</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line724"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line725"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line726"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//offset for purposes of matching (TODO: fix?)</span></pre></div><div id="line727"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$maxConsecutiveCharsRegexOffset</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_INC">++</span><span class="token T_VARIABLE">$maxConsecutiveChars</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_MINUS">-</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">2</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line728"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line729"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//build regex</span></pre></div><div id="line730"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$maxConsecutiveCharsRegex</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'/'</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_DOT">.</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_regexBuildPattern</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_LNUMBER">5</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$maxConsecutiveCharsRegexOffset</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_DOT">.</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">'/'</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line731"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//die(print_r($maxConsecutiveCharsRegex));</span></pre></div><div id="line732"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$testVal</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">preg_match</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$maxConsecutiveCharsRegex</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line733"><br/></div><div id="line734"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$testVal</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_IDENTICAL">===</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">false</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line735"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'A fatal error occured in the password validation'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1018</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line736"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_WHITESPACE"> </span><span class="token T_ELSEIF">elseif</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$testVal</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line737"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The password violates policy about consecutive character repetitions. '</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_getPasswordCharacterRepeatDescription</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">USERCREDENTIAL_ACCOUNTPOLICY_WEAKPASSWD</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line738"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_WHITESPACE"> </span><span class="token T_ELSE">else</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line739"><pre><span class="token T_WHITESPACE">            </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line740"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_WHITESPACE">        </span></pre></div><div id="line741"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line742"><pre><span class="token T_WHITESPACE">        </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line743"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line744"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line745"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line746"><pre><span class="token T_DOC_COMMENT">     * validate the password policy during authentication</span></pre></div><div id="line747"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line748"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line749"><pre><span class="token T_DOC_COMMENT">     * 2018-07-18</span></pre></div><div id="line750"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line751"><pre><span class="token T_DOC_COMMENT">     * @return bool</span></pre></div><div id="line752"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line753"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line754"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line755"><pre><span class="token T_DOC_COMMENT">     */</span><span class="token T_WHITESPACE">    </span></pre></div><div id="line756"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_validatePolicy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line757"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that required indices exist</span></pre></div><div id="line758"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'username'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line759"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line760"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'fullname'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line761"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'passhist'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line762"><pre><span class="token T_WHITESPACE">         </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line763"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">Exception</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The username and password are not set'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1019</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line764"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line765"><br/></div><div id="line766"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//determine which entropy to use (base or udf)</span></pre></div><div id="line767"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$policyObj</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfPasswordPolicy</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line768"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line769"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//check attempt limits</span></pre></div><div id="line770"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'account_state'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">USERCREDENTIAL_ACCOUNTSTATE_AUTHFAILED</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line771"><pre><span class="token T_WHITESPACE">            </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'policyinfo'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'failed_attempt_count'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_GT">&gt;</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_limit'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line772"><pre><span class="token T_WHITESPACE">                </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The account has exceeded login attempts and is locked. Contact admin'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">USERCREDENTIAL_ACCOUNTPOLICY_ATTEMPTLIMIT2</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line773"><pre><span class="token T_WHITESPACE">            </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_WHITESPACE"> </span><span class="token T_ELSEIF">elseif</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'policyinfo'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'failed_attempt_count'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_limit'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE">  </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line774"><pre><span class="token T_WHITESPACE">                </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The account has failed login '</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_INC">++</span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_limit'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_CONSTANT_ENCAPSED_STRING">' times in a row and is temporarily locked. Any further wrong passwords will lead to your account being locked fully. You will be automatically unlocked in '</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'illegal_attempts_penalty_seconds'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_DIV">/</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">60</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_DOT">.</span><span class="token T_CONSTANT_ENCAPSED_STRING">' minutes or contact admin to unlock immediately'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">USERCREDENTIAL_ACCOUNTPOLICY_ATTEMPTLIMIT1</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line775"><pre><span class="token T_WHITESPACE">            </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_WHITESPACE"> </span><span class="token T_ELSE">else</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line776"><pre><span class="token T_WHITESPACE">                </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'Login failed. Wrong username or password'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">USERCREDENTIAL_ACCOUNTPOLICY_VALID</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line777"><pre><span class="token T_WHITESPACE">            </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line778"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line779"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line780"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//check needs reset</span></pre></div><div id="line781"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$currDateTimeObj</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">DateTime</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line782"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$passChangeDaysElapsedObj</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$currDateTimeObj</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">diff</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'policyinfo'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_last_changed_datetime'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line783"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$passChangeDaysElapsed</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$passChangeDaysElapsedObj</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">format</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'%a'</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line784"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line785"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$passChangeDaysElapsed</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_GT">&gt;</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_reset_frequency'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line786"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The password has expired and must be changed'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">USERCREDENTIAL_ACCOUNTPOLICY_EXPIRED</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line787"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line788"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line789"><pre><span class="token T_WHITESPACE">        </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">        </span></pre></div><div id="line790"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line791"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line792"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line793"><pre><span class="token T_DOC_COMMENT">     * validate the password policy during process of making a password change</span></pre></div><div id="line794"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line795"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line796"><pre><span class="token T_DOC_COMMENT">     * 2018-07-18</span></pre></div><div id="line797"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line798"><pre><span class="token T_DOC_COMMENT">     * @return bool</span></pre></div><div id="line799"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line800"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line801"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line802"><pre><span class="token T_DOC_COMMENT">     */</span><span class="token T_WHITESPACE">      </span></pre></div><div id="line803"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_validatePolicyAtChange</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line804"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//validate that required indices exist</span></pre></div><div id="line805"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'username'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line806"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line807"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'fullname'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line808"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'passhist'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line809"><pre><span class="token T_WHITESPACE">         </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line810"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">Exception</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The username and password are not set'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1020</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line811"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line812"><br/></div><div id="line813"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//determine which entropy to use (base or udf)</span></pre></div><div id="line814"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$policyObj</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_udfPasswordPolicy</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line815"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line816"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//check password repeat</span></pre></div><div id="line817"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$passHistory</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'passhist'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line818"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$passHistoryRequired</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">array_slice</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$passHistory</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">0</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_INT_CAST">(int)</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_repeat_minimum'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line819"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line820"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//iterate and verify</span></pre></div><div id="line821"><pre><span class="token T_WHITESPACE">        </span><span class="token T_FOREACH">foreach</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$passHistoryRequired</span><span class="token T_WHITESPACE"> </span><span class="token T_AS">as</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$passHistoryItem</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line822"><pre><span class="token T_WHITESPACE">            </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_STRING">password_verify</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$passHistoryItem</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line823"><pre><span class="token T_WHITESPACE">                </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">UserCredentialException</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'User cannot repeat any of their '</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_DOT">.</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$policyObj</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_repeat_minimum'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_DOT">.</span><span class="token T_WHITESPACE"> </span><span class="token T_CONSTANT_ENCAPSED_STRING">' last passwords'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">USERCREDENTIAL_ACCOUNTPOLICY_REPEATERROR</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line824"><pre><span class="token T_WHITESPACE">            </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line825"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line826"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line827"><pre><span class="token T_WHITESPACE">        </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">        </span></pre></div><div id="line828"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line829"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line830"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line831"><pre><span class="token T_DOC_COMMENT">     * Check that a user can change password in case you want to implement limits on changing passwords</span></pre></div><div id="line832"><pre><span class="token T_DOC_COMMENT">     * only once in 24 hours</span></pre></div><div id="line833"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line834"><pre><span class="token T_DOC_COMMENT">     * Cyril Ogana &lt;cogana@gmail.com&gt;</span></pre></div><div id="line835"><pre><span class="token T_DOC_COMMENT">     * 2018-07-18</span></pre></div><div id="line836"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line837"><pre><span class="token T_DOC_COMMENT">     * @return bool</span></pre></div><div id="line838"><pre><span class="token T_DOC_COMMENT">     *</span></pre></div><div id="line839"><pre><span class="token T_DOC_COMMENT">     * @access protected</span></pre></div><div id="line840"><pre><span class="token T_DOC_COMMENT">     * @final</span></pre></div><div id="line841"><pre><span class="token T_DOC_COMMENT">     */</span><span class="token T_WHITESPACE">       </span></pre></div><div id="line842"><pre><span class="token T_WHITESPACE">    </span><span class="token T_FINAL">final</span><span class="token T_WHITESPACE"> </span><span class="token T_PROTECTED">protected</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">_canChangePassword</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line843"><pre><span class="token T_WHITESPACE">         </span><span class="token T_COMMENT">//validate that required indices exist</span></pre></div><div id="line844"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'username'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line845"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line846"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'fullname'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line847"><pre><span class="token T_WHITESPACE">            </span><span class="token T_BOOLEAN_OR">||</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EXCLAMATION_MARK">!</span><span class="token T_ISSET">isset</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'passhist'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span></pre></div><div id="line848"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line849"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">Exception</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'The username and password are not set'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1021</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line850"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line851"><pre><span class="token T_WHITESPACE">  </span></pre></div><div id="line852"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//Verify if the password was changed today or server has been futuredated</span></pre></div><div id="line853"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$currDateTimeObj</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">DateTime</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line854"><pre><span class="token T_WHITESPACE">        </span></pre></div><div id="line855"><pre><span class="token T_WHITESPACE">        </span><span class="token T_COMMENT">//Password was changed today or in the future</span></pre></div><div id="line856"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$currDateTimeObj</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_SMALLER_OR_EQUAL">&lt;=</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$this</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">_userProfile</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'policyinfo'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_OPEN_SQUARE">[</span><span class="token T_CONSTANT_ENCAPSED_STRING">'password_last_changed_datetime'</span><span class="token T_PHPDOX_CLOSE_SQUARE">]</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line857"><pre><span class="token T_WHITESPACE">            </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">false</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line858"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_WHITESPACE"> </span><span class="token T_ELSE">else</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line859"><pre><span class="token T_WHITESPACE">            </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">true</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line860"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line861"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line862"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line863"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line864"><pre><span class="token T_DOC_COMMENT">     * Check password strength using NIST Or Wolfram adapter (default NIST)</span></pre></div><div id="line865"><pre><span class="token T_DOC_COMMENT">     * See https://github.com/rchouinard/phpass</span></pre></div><div id="line866"><pre><span class="token T_DOC_COMMENT">     * Many thanks to Ryan Chouinard for the phpass package</span></pre></div><div id="line867"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line868"><pre><span class="token T_DOC_COMMENT">     * @param string $passwordString - The password string to evaluate</span></pre></div><div id="line869"><pre><span class="token T_DOC_COMMENT">     * @param int $strengthAdapter - Named constant representing adapter to use (default NIST)</span></pre></div><div id="line870"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line871"><pre><span class="token T_DOC_COMMENT">     * @return int</span></pre></div><div id="line872"><pre><span class="token T_DOC_COMMENT">     * </span></pre></div><div id="line873"><pre><span class="token T_DOC_COMMENT">     * @access public</span></pre></div><div id="line874"><pre><span class="token T_DOC_COMMENT">     * @static</span></pre></div><div id="line875"><pre><span class="token T_DOC_COMMENT">     */</span></pre></div><div id="line876"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_STATIC">static</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">passwordStrength</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$passwordString</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$strengthAdapter</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">PHPASS_PASSWORDSTRENGTHADAPTER_NIST</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line877"><pre><span class="token T_WHITESPACE">        </span><span class="token T_IF">if</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$strengthAdapter</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">PHPASS_PASSWORDSTRENGTHADAPTER_WOLFRAM</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line878"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$strengthAdapter</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">Strength</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">Adapter</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">Wolfram</span><span class="token T_PHPDOX_SEMICOLON">;</span><span class="token T_WHITESPACE">        </span></pre></div><div id="line879"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_WHITESPACE"> </span><span class="token T_ELSEIF">elseif</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$strengthAdapter</span><span class="token T_WHITESPACE"> </span><span class="token T_IS_EQUAL">==</span><span class="token T_WHITESPACE"> </span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">PHPASS_PASSWORDSTRENGTHADAPTER_NIST</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line880"><pre><span class="token T_WHITESPACE">            </span><span class="token T_VARIABLE">$strengthAdapter</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">Strength</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">Adapter</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">Nist</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line881"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span><span class="token T_WHITESPACE"> </span><span class="token T_ELSE">else</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line882"><pre><span class="token T_WHITESPACE">            </span><span class="token T_THROW">throw</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">Exception</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_CONSTANT_ENCAPSED_STRING">'Phpass strength adapter calculator must be NIST or Wolfram. Wrong Flag provivded.'</span><span class="token T_PHPDOX_COMMA">,</span><span class="token T_WHITESPACE"> </span><span class="token T_LNUMBER">1022</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line883"><pre><span class="token T_WHITESPACE">        </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line884"><br/></div><div id="line885"><pre><span class="token T_WHITESPACE">        </span><span class="token T_VARIABLE">$phpassStrength</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_WHITESPACE"> </span><span class="token T_NEW">new</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">Strength</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$strengthAdapter</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line886"><pre><span class="token T_WHITESPACE">        </span><span class="token T_RETURN">return</span><span class="token T_WHITESPACE"> </span><span class="token T_VARIABLE">$phpassStrength</span><span class="token T_OBJECT_OPERATOR">-&gt;</span><span class="token T_STRING">calculate</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$passwordString</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line887"><pre><span class="token T_WHITESPACE">    </span><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line888"><pre><span class="token T_WHITESPACE">    </span></pre></div><div id="line889"><pre><span class="token T_WHITESPACE">    </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line890"><pre><span class="token T_DOC_COMMENT">        * Abstract methods for concrete implementation</span></pre></div><div id="line891"><pre><span class="token T_DOC_COMMENT">        */</span></pre></div><div id="line892"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">getBaseEntropy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line893"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">getBaseEntropyOverride</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line894"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">getBasePasswordPolicy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line895"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">getPasswordEntropyDescription</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line896"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">getPasswordLengthDescription</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line897"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">getPasswordPolicyDescription</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line898"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">getUdfEntropy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line899"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">getUdfPasswordPolicy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line900"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">setBaseEntropyOverride</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$toggle</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line901"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">setUdfEntropy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line902"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">setUdfPasswordPolicy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_VARIABLE">$entropyObj</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line903"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">validateEntropy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line904"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">validateLength</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line905"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">validateConsecutiveCharacterRepeat</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line906"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">validatePolicy</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line907"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">validatePolicyAtChange</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line908"><pre><span class="token T_WHITESPACE">    </span><span class="token T_ABSTRACT">abstract</span><span class="token T_WHITESPACE"> </span><span class="token T_PUBLIC">public</span><span class="token T_WHITESPACE"> </span><span class="token T_FUNCTION">function</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">canChangePassword</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line909"><pre><span class="token T_PHPDOX_CLOSE_CURLY">}</span></pre></div><div id="line910"><br/></div></td></tr></table></section></div><footer><span>Generated using phpDox 0.7.0 - Copyright (C) 2010 - 2015 by Arne Blankerts</span></footer></body></html>