MCPcopy Create free account
hub / github.com/error311/FileRise / encryptData

Function encryptData

config/config.php:187–194  ·  view source on GitHub ↗

Encryption helpers

($data, $encryptionKey)

Source from the content-addressed store, hash-verified

185
186// Encryption helpers
187function encryptData($data, $encryptionKey)
188{
189 $cipher = 'AES-256-CBC';
190 $ivlen = openssl_cipher_iv_length($cipher);
191 $iv = openssl_random_pseudo_bytes($ivlen);
192 $ct = openssl_encrypt($data, $cipher, $encryptionKey, OPENSSL_RAW_DATA, $iv);
193 return base64_encode($iv . $ct);
194}
195
196function decryptData($encryptedData, $encryptionKey)
197{

Callers 9

encryptRequiredMethod · 0.85
removeUserMethod · 0.85
updateUserPermissionsMethod · 0.85
setupTOTPMethod · 0.85
updateConfigMethod · 0.85
encryptSecretMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected