Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Encrypt - Decrypt file using chacha20

does anyone know tutorial for simple encryption and decryption of a file using the chacha20 algorithm in c# that is easy to understand for beginners without bouncycastle library ?
I found this on Github but an error appeared when I imported it into Visual Studio ( https: // github . com /Datasilk/Crypto )
What error did you get? Are you looking for a library for dotnet or dotnet core?

Need some more info. :)
(Apr 13, 2019 03:16 AM)SIM-3547942 Wrote:  What error did you get? Are you looking for a library for dotnet or dotnet core?

Need some more info. :)

error appears in all class files, I use net framework 3.5 and want to try encryption and decryption using the chacha20 algorithm without the bouncy castle library.
Here's the C++ source as from Wikipedia it should be pretty easy to translate to C#



As for the link you posted, all you have to do is retarget from .NET Core to .NET Framework. It's usually as easy as just copying the code into a new project.
[Image: Syr3DlV.png]
(Apr 13, 2019 06:57 AM)Iera Namhorun Wrote:  error appears in all class files, I use net framework 3.5 and want to try encryption and decryption using the chacha20 algorithm without the bouncy castle library.

Ouch, that .net Framework 3.5 requirement could be a serious issue..

- libsodium-net (https://github.com/adamcaudill/libsodium-net) requires dotnet framework 4.0..
- nsec (https://github.com/ektrah/nsec) is only available for dotnet core.

Not sure if it will fit your needs or it will work, but you could try the following library from Github and try to compile it againt 3.5:

https://github.com/sbennett1990/ChaCha20-csharp
(Apr 13, 2019 08:33 AM)SIM-3547942 Wrote:  Ouch, that .net Framework 3.5 requirement could be a serious issue..

- libsodium-net (link) requires dotnet framework 4.0..
- nsec (link) is only available for dotnet core.

Not sure if it will fit your needs or it will work, but you could try the following library from Github and try to compile it againt 3.5:

[link]

owh, thankyou.
I do not know if it must use the net framework above 3.5

(Apr 13, 2019 08:28 AM)gigajew Wrote:  Here's the C++ source as from Wikipedia it should be pretty easy to translate to C#

[link]
As for the link you posted, all you have to do is retarget from .NET Core to .NET Framework.  It's usually as easy as just copying the code into a new project.

okay, I will try it

(Apr 13, 2019 08:28 AM)gigajew Wrote:  As for the link you posted, all you have to do is retarget from .NET Core to .NET Framework.  It's usually as easy as just copying the code into a new project.
but error still appears, I have changed to net framework 4.0 and 4.5
https://images2.imgbox.com/31/1f/fMavqHYT_o.png


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by ZamperJan 28, 2020 09:30 PM 3 175 Jan 28, 2020 09:30 PM
Last Post: Shisho
[C] by VoxiFeb 27, 2019 03:55 PM 3 257 Feb 27, 2019 03:55 PM
Last Post: Voxi
[C#] by gigajewApr 20, 2018 04:25 AM 2 484 Apr 20, 2018 04:25 AM
Last Post: EZLib