Guest User

Untitled

a guest
Oct 20th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. public function encryptEmail(Request $request) {
  2. if (!Auth::check() && !Auth::viaRemember()) {
  3. return redirect()->to('/login');
  4. }
  5. $this->validate($request, [
  6. 'email' => 'bail|required|email',
  7. ]);
  8. $emailToEncrypt = $request->request->get('email');
  9. $encryptedEmail = Crypt::encryptString($emailToEncrypt);
  10. $email = Emails::where('accountId', Auth::id())->first();
  11. $email->val = $encryptedEmail;
  12. $email->save();
  13.  
  14. string in form decrypt PHP decrypt Python
  15. 'test@gmail.com' => 'test@gmail.com', 'test@gmail.com'
  16. 'myEmail@icloud.com' => 'myEmail@icloud.com' 'myEmail@icloud.com'
  17. 'other@hotmail.com' => 'other@hotmail.com' 'other@hotmail.com'
  18. 'me@mydomain.com' => 'me@mydomain.com' 'me@my'
Add Comment
Please, Sign In to add comment