diff --git a/devolutionscrypto/Cargo.toml b/devolutionscrypto/Cargo.toml index 1f4a359af..0a16297f5 100644 --- a/devolutionscrypto/Cargo.toml +++ b/devolutionscrypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "devolutionscrypto" -version = "0.1.4" +version = "0.1.5" authors = ["Philippe Dugre ", "Mathieu Morrissette "] edition = "2018" readme = "../README.md" diff --git a/wrappers/csharp/GeneratePackage.py b/wrappers/csharp/GeneratePackage.py index 2f77d5fd9..06af2ae7d 100644 --- a/wrappers/csharp/GeneratePackage.py +++ b/wrappers/csharp/GeneratePackage.py @@ -119,7 +119,7 @@ dllpath = "./" + folder + "/bin/DevolutionsCrypto-" + arch["name"] + ".dll" if rdm: - dllpath = "./rdm/bin/" + arch["name"] + "/DevolutionsCrypto-" + arch["name"] + ".dll" + dllpath = "./rdm/bin/" + arch["name"] + "/DevolutionsCrypto.dll" shutil.copy("../../devolutionscrypto/target/" + arch["value"] + "/release/devolutionscrypto.dll", dllpath) diff --git a/wrappers/csharp/Managed.cs b/wrappers/csharp/Managed.cs index a3b582470..8a990b946 100644 --- a/wrappers/csharp/Managed.cs +++ b/wrappers/csharp/Managed.cs @@ -5,6 +5,21 @@ namespace Devolutions.Cryptography public static class Managed { + public static byte[] DeriveKey(byte[] password, byte[] salt = null, uint iterations = 10000) + { + return Native.DeriveKey(password, salt, iterations); + } + + public static byte[] DeriveKey(string password, byte[] salt = null, uint iterations = 10000) + { + return Native.DeriveKey(Utils.StringToByteArray(password), salt, iterations); + } + + public static byte[] GenerateKey(uint keySize) + { + return Native.GenerateKey(keySize); + } + /*************************************************************** * * Encrypt