mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-13 05:26:47 +00:00
🚀 feat(dependencies): add spatie/laravel-ciphersweet package for encryption support
✨ feat(profile): integrate email and fax fields in association profile 🆕 feat(migrations): create blind_indexes table for encrypted data 🔧 feat(model): implement CipherSweet in EinundzwanzigPleb for email encryption 🔧 config: add ciphersweet configuration file for encryption settings 🗄️ migration: add email field to einundzwanzig_plebs table for user data
This commit is contained in:
54
config/ciphersweet.php
Normal file
54
config/ciphersweet.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/**
|
||||
* This controls which cryptographic backend will be used by CipherSweet.
|
||||
* Unless you have specific compliance requirements, you should choose
|
||||
* "nacl".
|
||||
*
|
||||
* Supported: "boring", "fips", "nacl", "custom"
|
||||
*/
|
||||
'backend' => env('CIPHERSWEET_BACKEND', 'nacl'),
|
||||
|
||||
/**
|
||||
* Set backend-specific options here. "custom" points to a factory class that returns a
|
||||
* backend from its `__invoke` method. Please see the docs for more details.
|
||||
*/
|
||||
'backends' => [
|
||||
// 'custom' => CustomBackendFactory::class,
|
||||
],
|
||||
|
||||
/**
|
||||
* Select which key provider your application will use. The default option
|
||||
* is to read a string literal out of .env, but it's also possible to
|
||||
* provide the key in a file or use random keys for testing.
|
||||
*
|
||||
* Supported: "file", "random", "string", "custom"
|
||||
*/
|
||||
'provider' => env('CIPHERSWEET_PROVIDER', 'string'),
|
||||
|
||||
/**
|
||||
* Set provider-specific options here. "string" will read the key directly
|
||||
* from your .env file. "file" will read the contents of the specified file
|
||||
* to use as your key. "custom" points to a factory class that returns a
|
||||
* provider from its `__invoke` method. Please see the docs for more details.
|
||||
*/
|
||||
'providers' => [
|
||||
'file' => [
|
||||
'path' => env('CIPHERSWEET_FILE_PATH'),
|
||||
],
|
||||
'string' => [
|
||||
'key' => env('CIPHERSWEET_KEY'),
|
||||
],
|
||||
// 'custom' => CustomKeyProviderFactory::class,
|
||||
],
|
||||
|
||||
/*
|
||||
* The provided code snippet checks whether the $permitEmpty property is set to false
|
||||
* for a given field. If it is not set to false, it throws an EmptyFieldException indicating
|
||||
* that the field is not defined in the row. This ensures that the code enforces the requirement for
|
||||
* the field to have a value and alerts the user if it is empty or undefined.
|
||||
* Supported: "true", "false"
|
||||
*/
|
||||
'permit_empty' => env('CIPHERSWEET_PERMIT_EMPTY', FALSE)
|
||||
];
|
||||
Reference in New Issue
Block a user