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

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay