My Requirement is i need to convert base64 to encrypted value
encrypt value to url
url to Image visible
when i read the url the image should be display how to do it.
My Requirement is i need to convert base64 to encrypted value
encrypt value to url
url to Image visible
when i read the url the image should be display how to do it.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh KumarPosted Mar 16, 2023, 5:47 AM
Helle Jaya prakash,
To store encrypted Image,
read this encrypted image from imagepath,
Tuhin PaulPosted Mar 16, 2023, 5:11 AM
updated version of the code:
This code takes a Base64-encoded string as input and returns an Image object. It uses a try-catch block to handle exceptions and disposes of the MemoryStream object using the using statement.
Tuhin PaulPosted Mar 15, 2023, 12:04 PM
Hello Jaya,
To achieve this requirement in C#, you can try these steps:
1) Convert Base64 to encrypted value:
You can use a symmetric encryption algorithm such as AES to encrypt the Base64 string. Here is an example of how you can do this in C#:
2) Encrypt value to URL:
To encrypt the value to URL, you can use a URL-safe encryption algorithm such as Base64URL. Here is an example of how you can do this in C#:
3) URL to Image visible:
To make the URL visible as an image, you need to generate an image file from the URL. You can do this by creating a new Bitmap object from the URL and then saving it to a file:
4) Read the URL and display the image:
To display the image, you can use a PictureBox control in a Windows Forms application or an Image control in a WPF application. Here is an example of how you can do this in a Windows Forms application:
This will load the image from the URL and display it in the PictureBox control.
Vishal JoshiPosted Mar 15, 2023, 11:47 AM
Hello Jaya
Please type code like the below sample.
Thanks