vendredi 2 février 2018

GnupG gnupg_encrypt Nginx PHP5 dont echo results

I have installed all correct and my script are not the problem. I have set also the .gnupg folder to right permission.

But the script dont echo any results:

use gnupg;

public function showDecryptionForm()
{
  if(session()->has('user_name'))
  {
    $user_name = session()->get('user_name');
    $user_password = session()->get('user_password');
  }
  else
  {
    return redirect()->route('login');
  }
  $user_details = User::where('username',$user_name)->first();

  $secret = $this->generateSecretKey();

  $secret_hash = password_hash($secret, PASSWORD_BCRYPT);

  $this->secret_code = $secret_hash;

  //echo $user_details->pgp;

  putenv("GNUPGHOME =/home/.gnupg");
  $gpg = new gnupg();
  $key = $gpg->import($user_details->pgp);
  $gpg->addencryptkey($key['fingerprint']);
  $enc = $gpg->encrypt($secret);
  $gpg->clearencryptkeys();
  //echo '<textarea rows="30" class="form-control" name="pgp-msg">'.$enc.'</textarea>';

  session()->flash('secret_hash',$secret_hash);

  return view('auth.decryptionform',compact('enc','user_name','user_password'));
}

Blade

<textarea name="message" id="message" class="form-control" rows="15" cols="40" readonly></textarea>

No Errors or Logs..

Anyone an Idea?

Many Thanks



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2DXxjg9
via IFTTT

Aucun commentaire:

Enregistrer un commentaire