Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] add table prefix to ciphersweet:encrypt command #60

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

aryala7
Copy link
Contributor

@aryala7 aryala7 commented Jan 10, 2024

The issue arises when attempting to transfer encrypted data from one table to another. After executing the command on the updated data, the system returns an error with the message Invalid Ciphertext Header. This occurs because the code attempts to encrypt the data with the new table name, but encounters a problem in the process.
here is an example:
Imagine you have an "operator_operators" table where email and cellphone information is encrypted. Now, suppose you want to transfer these records to another table named "causers" without utilizing a model. However, attempting to do this with your operator might lead to the following error:

if (!is_string($plaintext)) {
    throw new \SodiumException("Invalid ciphertext");
}

This error occurs when the code encounters an unexpected situation during the transfer process, specifically when checking if the plaintext is a string.

@riasvdv riasvdv merged commit c8961f3 into spatie:main Mar 13, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants