Questions tagged [laravel-encryption]

14 questions
6
votes
3 answers

How to calculate the maximum length of the output of the Laravel encryption method?

Setup Given the following: $s = Crypt::encryptString('a'); Is is possible to know, for a string of length 1, the possible range of lengths of $s? Context Database storage - need to store an encrypted value, and would like to set validation of the…
Chris
  • 54,599
  • 30
  • 149
  • 186
2
votes
2 answers

Laravel json response returns encrypted data

I'm using an Encryptable trait to encrypt my data for the a Room model. RoomController (/rooms) returns the decrypted data but ApiRoomController (/api/rooms) does not. How could I make it returns the decrypted data? Encryptable Trait trait…
Lucien Dubois
  • 1,590
  • 5
  • 28
  • 53
2
votes
2 answers

can't overwrite laravel elequent output's id field

I can't overwrite the $user->id in the following code : $followers_list = follow::where('followed_id',$userId['userId']) ->get(); foreach($followers_list as $follower) { $user =…
blank94
  • 374
  • 3
  • 20
1
vote
2 answers

how to get the 32bit secret encryption key from laravel env file

I am trying to fetch the secret encryption key from laravel so that I can use it on the mobile app end for decrypting the data. When I run the command in the laravel php artisan key:generate It created the below key in the .env file in laravel.…
Arif
  • 377
  • 2
  • 5
  • 21
1
vote
1 answer

Laravel encryption key "disappears" on page load

I have some trouble with Laravel and Ajax that I haven't been able to Google or Stackoverflow my way out of. Whatever solutions I've seen, I've already accounted for. Sporadically I'm getting a 500 error (sometimes it's 401). It only happens with…
0
votes
2 answers

Laravel Encryption/Decryption issue

I am storing users credentials for a 3rd party service in my database. When storing, these are cast to encrypted as below: protected $casts = [ 'enabled' => 'boolean', 'token_is_valid' => 'boolean', 'service_username' => 'encrypted', …
J Foley
  • 1,038
  • 1
  • 17
  • 30
0
votes
0 answers

How to get one row (Encrypted value) from database with Laravel?

I'm working on a project and I want to use encrypt/decrypt for database values. I encrypted the 'email' field, and it works fine, but when I want to run this query I got an error. The query: Users::where('email', 'example@gmail.com')->get(); -> in…
daniel19
  • 67
  • 8
0
votes
2 answers

How can I search encrypted data in Laravel using like operator

How can I search data in Laravel using like operator, I have used encrypt($searchValue); OR Crypt::encryptString($searchValue) But both return full encrypted data but I need searchable data using like operator, In that case, the first name is the…
0
votes
0 answers

Can i search encrypted data in Laravel

In the Laravel, I have encrypted records in my table and I would like to search these records. The problem occur when I do search and encrypt again my search term, it encrypts it again generating random string.
0
votes
1 answer

What is the best way to back up a database encrypted with Laravel?

I'm using the package betterapp\LaravelDbEncrypter to encrypt some data in the DB. If something goes wrong and I lose the access to the server, even if I have a back up of the database in a different place, I won't be able to access that data…
Inigo EC
  • 2,178
  • 3
  • 22
  • 31
0
votes
1 answer

Laravel: encrypt the uploaded file/image

I am new in laravel, try to encrypt the uploaded file. Here is my controller: if ($file != null && !empty($file)) { $userfile = DNEUser::find($lastUserId); $user_store_pic = $request->file('user_store_pic'); $fileContent =…
Sagar Parikh
  • 288
  • 5
  • 20
0
votes
1 answer

Is there a way to alter Laravel Encryption algorithm, so it generates the same value against the same string?

I am saving the encrypted user data (including user email which is used to login) with Laravel's built in encryption method. At login, I have to provide encrypted email for authentication but Encryption algorithm generates a different string each…
0
votes
1 answer

can we rely on laravel encryption for future?

We are building application where we need to store a data encrypted in database and instead of using MySql AES_ENCRYPT and AES_DECRYPT we are plaining to use laravel's inbuilt encrypt & decrypt functions. Is it will be future proof as we don't want…
Vinod Raut
  • 63
  • 6
0
votes
1 answer

decrypt random error with Laravel's built-in encryption facilities

I send invitation by mail to users with a encrypted email to know which user respond to invitation. Something like: Hello, click on this link to start learning:…
rap-2-h
  • 30,204
  • 37
  • 167
  • 263