Back to product page
Decrypt method
Decrypts the contents of the Blob.
Type
NoneSyntax
- Basic
Remarks
The Decrypt method will try to decrypt data in a given Blob and return it to the outgoing Blob with plaintext (readable) data. Prior to using it, you must select a symmetric algorithm in the Type property.Code sample
- Basic
Dim crypt As New wodCryptCom
Dim i_blob As New MemBlob
Dim o_blob As New MemBlob
' look in Encrypt method help to see how we got below data - base64 encoded
i_blob.FromBase64 ("xHBuQv8ae1vXCVA6/3/YCd5IUjL3lbnbzHDjlWt74fGfcNuS3osQtID1BMhepJI3")
crypt.Type = AES
crypt.SecretKey = "my secret word"
crypt.Decrypt i_blob, o_blob
Debug.Print o_blob.Text
result:
"this is text to be encrypted"
Dim i_blob As New MemBlob
Dim o_blob As New MemBlob
' look in Encrypt method help to see how we got below data - base64 encoded
i_blob.FromBase64 ("xHBuQv8ae1vXCVA6/3/YCd5IUjL3lbnbzHDjlWt74fGfcNuS3osQtID1BMhepJI3")
crypt.Type = AES
crypt.SecretKey = "my secret word"
crypt.Decrypt i_blob, o_blob
Debug.Print o_blob.Text
result:
"this is text to be encrypted"