File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// See https://aka.ms/new-console-template for more information
22
3- using SafeCrypt . AESDecryption ;
4- using SafeCrypt . AESEncryption ;
3+ using SafeCrypt . AES ;
54using SafeCrypt . Models ;
65
76var dataToEncrypt = "Data to Encrypt" ;
109// Encryption process
1110// this method generates a random IV key for the encryption process
1211// the IV is returned in the response with other properties
13- var response = await AesEncryption . EncryptToBase64StringAsync ( dataToEncrypt , secret ) ;
12+ var response = await Aes . EncryptToBase64StringAsync ( dataToEncrypt , secret ) ;
1413
1514Console . WriteLine ( "............Encryption Started............" ) ;
1615
2726 DataToDecrypt = response . EncryptedData
2827} ;
2928
30- var decryptionData = await AesDecryption . DecryptFromBase64StringAsync ( decryptorParam ) ;
29+ var decryptionData = await Aes . DecryptFromBase64StringAsync ( decryptorParam ) ;
3130
3231Console . WriteLine ( "............Decryption Started............" ) ;
3332Console . WriteLine ( $ "Decrypted data: { decryptionData . DecryptedData } ") ;
You can’t perform that action at this time.
0 commit comments