LunaticThinker.me

Thoughts on code and poetry.

Welcome to LunaticThinker.me - thoughts on code and poetry.

Cross Programming Language Encryption – CSharp vs Go, Part 2

GitHub stars GitHub followers
See a demo at Github


The first part of this article{.aioseop-link}, discussed Encryption coding at C# level. It introduced you in the world of AES{.aioseop-link} and RSA{.aioseop-link} encryption algorithms. But the role of this story is not only to introduce you to some encryption algorithms but also show you how to code them under some programming languages.

Resizing Transparent PNG in ColdFusion

Hello guys,

Needed to do this for a project my team is maintaining, but I could only find the solution for ColdFusion, which looks like this:

JavaImport = structNew();

JavaImport.io = structNew();
JavaImport.io.File = CreateObject('java', 'java.io.File');

JavaxImport = StructNew();

JavaxImport.imageio = StructNew();
JavaxImport.imageio.ImageIO = CreateObject('java', 'javax.imageio.ImageIO');

imageBuffer = JavaxImport.imageio.ImageIO.read(JavaImport.io.File.Init(imagePath));

response = getPageContext().getFusionContext().getResponse();
response.setHeader('Content-Type', 'image/png');
response.setHeader('Cache-Control', 'max-age=604800, public');
JavaxImport.imageio.ImageIO.write(imageBuffer, "png", response.getResponse().getOutputStream() );

After consulting Railo documentation on GetPageContext method, we’ve come to the following result:

0%