'PasswordDeriveBytes.CryptDeriveKey only compatible on windows

Translating some legacy code to NET 6 running on Linux, getting an error as PasswordDeriveBytes.CryptDeriveKey is only compatible on windows.

Any idea how to replicate this for linux? This is the line that's causing issues:

des.Key = pdb.CryptDeriveKey("RC2", "MD5", 128, new byte[8]);

it returns an array of bytes enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source