Exemple #1
0
 public function KeyGet($master, $password, $key)
 {
     if ($this->MasterExists($master)) {
         require_once APP_DIR . "/src/Inc/Crypto.php";
         $items = getData("master_" . $master . "_items");
         $pass_salt = getData("master_" . $master . "_password_salt");
         $encrypt_key = $this->master_salt . $password . $pass_salt;
         Crypto::$KEY_BYTE_SIZE = mb_strlen($encrypt_key, '8bit');
         $items = base64_decode(Crypto::decrypt(base64_decode($items), $encrypt_key));
         $items = str_replace(""", "'", $items);
         $items = $items == null ? array() : json_decode($items, true);
         return isset($items[$key]) ? $items[$key] : null;
     } else {
         return false;
     }
 }