DEV Community

Rye
Rye

Posted on

AES/CBC/PKCS5Padding Encryption

I'm trying to create an encryption functionality using AES/CBC/PKCS5Padding, but unfortunately after hours of research it seems that there's no PKCS5 in C# (PKCS7 instead). Most of code snippets are built in Java. Also found something on .Net documentation that PKCS5 is same with PKCS7 but I haven't tried it yet.

Can you direct me to a resource where I can use as reference to create Encryption with AES/CBC/PKCS5Padding in Java and C#? Also if there are sample code using Bouncy Castle provider. Thanks in advance!

Here's the sample Code I've created
image

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay