Browse Source

(Refactor) default encryption method

Jens 2 years ago
parent
commit
bc34bb5fa0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      public/install/functions.php

+ 2 - 2
public/install/functions.php

@@ -146,7 +146,7 @@ function encryptSettingsValue(mixed $value, $serialize = true): string
 {
     $appKey = getEnvironmentValue('APP_KEY');
     $appKey = base64_decode(Str::after($appKey, 'base64:'));
-    $encrypter = new Encrypter($appKey, 'AES-256-CBC');
+    $encrypter = new Encrypter($appKey);
     $encryptedKey = $encrypter->encrypt($value, $serialize);
 
     return $encryptedKey;
@@ -163,7 +163,7 @@ function decryptSettingsValue(mixed $payload, $unserialize = true)
 {
     $appKey = getEnvironmentValue('APP_KEY');
     $appKey = base64_decode(Str::after($appKey, 'base64:'));
-    $encrypter = new Encrypter($appKey, 'AES-256-CBC');
+    $encrypter = new Encrypter($appKey);
     $decryptedKey = $encrypter->decrypt($payload, $unserialize);
 
     return $decryptedKey;