Encryption Extensions
Encrypt
This line calls the Encrypt extension method to encrypt the string sensitiveData. The resulting encrypted string is logged for debugging purposes.
Encrypt with Custom Key
This example shows how to encrypt data using a custom encryption key. The resulting encrypted string is logged for debugging.
Decrypt
This line calls the Decrypt extension method to decrypt the previously encrypted string. The result, which should match the original sensitive data, is logged for verification.
Decrypt with Custom Key
This demonstrates how to decrypt data that was encrypted with a custom key, ensuring that the same key is used for successful decryption. The decrypted result is logged for verification.
Last updated