MBFile #14
MbarkT3STO
started this conversation in
Classes
MBFile
#14
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Definition :
For encrypt and decrypt files
State :
Static class
Methods :
Encrypt
FileEncryptionModel
EncryptWithoutKey
FileEncryptionModel
Decrypt
FileDecryptionModel
DecryptWithoutKey
EncryptWithoutKey
methodFileDecryptionModel
Details :
Encrypt
Encrypt a file using a custom Key and/or IV
1st three overloads
Byte[]
Byte[]
Byte[]
2nd three overloads
String
Byte[]
Byte[]
EncryptWithoutKey
Encrypt a file without Key and IV
1st Overload
Byte[]
2nd Overload
String
Decrypt
Decrypt encrypted file bytes using a custom Key and/or IV used in the encryption operation
Byte[]
Byte[]
Byte[]
Key
parameter in decryption should converted frombase 64 string
tobytes
, to do that when sending the key use.FromBase64ToBytes()
extension method provided by MBSecurity.DecryptWithoutKey
Decrypt a file already encrypted using
EncryptWithoutKey
methodByte[]
Important notes
DecryptWithoutKey
method, if you encrypt your data usingEncryptWithoutKey
Encrypt
orEncryptWithoutKey
you will get a value typeFileEncryptionModel
has two properties (Key
andEncryptedBytes
)Key
is your or auto-generated key used in encryptionKey
returned after encryption is encryptedBeta Was this translation helpful? Give feedback.
All reactions