Skip to main content

Decall Function

The decall function in SwartzDB is used to decrypt an .sdb database file and convert it back into a readable JSON file.

Use decall only when absolutely necessary!

Decrypting .sdb files exposes sensitive data such as emails, phone numbers, password hashes, or other private information. Always ensure that the decrypted file is stored securely.


How decall Works​

πŸ”Ή Reads an encrypted .sdb file from the database.
πŸ”Ή Converts the secure database file back into a JSON file, making it readable.


Why decall is Risky​

βœ… .sdb files are secure and unreadable in their encrypted state.
❌ Decrypting them into JSON makes sensitive data vulnerable to exposure or leaks.
❌ Should only be used when absolutely necessary, such as debugging or migration.


Example Usage​

Before Decryption (users_encrypted.sdb)​

πŸ”’ Secure and unreadable.

Calling decall​

$sdb->decall("users_encrypted", "users_readable");

After Decryption (users_readable.json)​

[
{"id": 1, "name": "Alice", "email": "alice@example.com", "password": "hashed_password"},
{"id": 2, "name": "Bob", "email": "bob@example.com", "password": "hashed_password"}
]

🚨 Sensitive data is now readable! Proceed with caution.


Best Practices​

βœ… Use decall only when necessary, such as database migration or debugging.
βœ… Delete the decrypted JSON file as soon as it’s no longer needed.
βœ… Store sensitive data only in the encrypted .sdb format whenever possible.


Conclusion​

The decall function is a powerful but sensitive tool in SwartzDB. It should only be used when there is an absolute need to convert an .sdb file back to JSON. If misused, it can expose private information, leading to data leaks and security risks.