35 questions
1 vote
1 answer
117 views
Encryption implementation corrupting only last few bytes
Below is the code I've put together to implement encrypting arbitrary data using a user-supplied password. Imports System.IO Imports System.Security.Cryptography Public Class PasswordCrytoSerializer ...
2 votes
1 answer
305 views
Stuck with SHA1 on .NET Standard 2.0
I am making an upgrade from .NET Framework to hopefully .NET. The thing is that we have a big solution with more than a 100 projects. The idea is that this can go into stages. We could upgrade to .NET ...
-1 votes
1 answer
226 views
Translate from C# to Python | Rijndael, AES algorithms
I have code in C#, could you describe in words what is happening in the code? I tried to reproduce using this theme and this one aaand this one. But I didn't succeed. If you throw an example, it would ...
1 vote
1 answer
890 views
How many bytes should a password hash be when using Rfc2898DeriveBytes?
I have a hashing function below, is 128 byte hash for password overkill or underkill? public string HashPassword(string password) { Rfc2898DeriveBytes rfc = new( password, _salt, ...
3 votes
1 answer
976 views
Generate Rfc2898DeriveBytes key in JavaScript from C#
I have an application that encrypts and decrypts a field in C# using Rfc2898DeriveBytes. I have been trying to work out a cross platform solution using CryptoJS PBKDF2 to write a decrypt method in ...
3 votes
0 answers
1k views
Choosing salt and key size for Rfc2898DeriveBytes
I'm working on upgrading the password hashing function in a legacy asp.net application. It was using Rfc2898DeriveBytes with the default SHA1. I've upgraded the application now to .Net 4.7.2, so I'm ...
0 votes
1 answer
6k views
How to use CryptoJS in Angular 9 to get same encrypted string like C# Rfc2898DeriveBytes
I am trying to convert below C# code to angular 9 using CryptoJS because when I tried to convert C# code to angular, it gives different encrypted string. How to convert C# code using ...
1 vote
1 answer
417 views
Converting .Net decryption to Java
Currently I'm working on a project where they use AES encryption with RFC2898 derived bytes. This the decryption method that I've provided. Now I need to implement it in java. private string Decrypt(...
0 votes
1 answer
299 views
Create method like System.Web.Helpers.Crypto.HashPassword (ASP.NET) in nodejs?
How can I make password hash using RFC 2898 like https://learn.microsoft.com/en-us/previous-versions/aspnet/web-frameworks/gg538287(v=vs.111) in nodejs? My nodejs app are using a table of SQL server ...
0 votes
1 answer
240 views
Replicating Asp.net Identity Password Hash to Chilkat
Hi I want to replicate the password hashing that is done in asp.net identity such that, the resulting value of password hashed by asp.net identity and the password hashed by Chilkat are same. Is that ...
0 votes
1 answer
820 views
Issue With Encrypted Password in C# using Rfc2898DeriveBytes and MSSQL
I have made a login system for my application, however, it is working extremely inconsistently. Sometimes the password will work, but other times it says it's incorrect. I'm 100% sure I'm typing it ...
1 vote
1 answer
4k views
AES 256 bit encryption with Rfc2898DeriveBytes
I've run into a confusing use of AES with Rfc2898DeriveBytes. Here's the code that I've found.... public static string Decrypt(string encryptionKey, string cipherValue) { byte[] ...
1 vote
0 answers
638 views
Converting c# Rfc2898DeriveBytes encryption to PHP
Is there any functions in PHP that is equivalent to c# Rijndael AES encryption/decryption? I have include the c# code below. Please advise. protected string Encrypt(string clearText) { string ...
1 vote
2 answers
3k views
Rfc2898DeriveBytes for java?
My backend server is based on .NET. On the server there is use Rfc2898DeriveBytes encryption This is the code of .Net public static string Encrypt(string clearText) { string ...
1 vote
1 answer
570 views
From C# encryption key derivation to Ruby (PBKDF2)
I'm trying to rewrite the following key generation method written in C# into its Ruby equivalent: private static byte[] CreateKey(string password, int length) { var salt = ...