Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function encryptEmail(Request $request) {
- if (!Auth::check() && !Auth::viaRemember()) {
- return redirect()->to('/login');
- }
- $this->validate($request, [
- 'email' => 'bail|required|email',
- ]);
- $emailToEncrypt = $request->request->get('email');
- $encryptedEmail = Crypt::encryptString($emailToEncrypt);
- $email = Emails::where('accountId', Auth::id())->first();
- $email->val = $encryptedEmail;
- $email->save();
- string in form decrypt PHP decrypt Python
- 'test@gmail.com' => 'test@gmail.com', 'test@gmail.com'
- 'myEmail@icloud.com' => 'myEmail@icloud.com' 'myEmail@icloud.com'
- 'other@hotmail.com' => 'other@hotmail.com' 'other@hotmail.com'
- 'me@mydomain.com' => 'me@mydomain.com' 'me@my'
Add Comment
Please, Sign In to add comment