/** * Decrypt $this->WeakestLic * @access public * @return array Decrypted lic */ private final function DecryptLic() { // Extract sault from license if ($this->AlgoVersion < 2) { $chunks = explode("rmYG", current($this->WeakestLic)); $sault = $chunks[0]; $lic = $chunks[1]; } else { $sault = substr(current($this->WeakestLic), 0, 24); $lic = substr(current($this->WeakestLic), 24); } // Prepare and generate key - the base of trust $Crypto = new Crypto($this->LicKey); if ($this->AlgoVersion == 2) $shash = $Crypto->Hash("{$sault}{$this->LicKey}", "SHA256"); else $shash = $Crypto->Hash("{$sault} invalid {$this->LicKey}", "SHA256"); $key = substr($shash, 0, 12).substr($shash, -12); // end // Decrypt $retval = $Crypto->Decrypt($lic, $key); $retval = explode("|", $retval); $retval = array_map('trim', $retval); $Crypto = null; return($retval); }