English 中文(简体)
什么样的电离层模型/消除缺漏或AES加密的共同使用,将使用网络?
原标题:What cipher mode/padding defaults or common uses of AES encryption would be used with .NET?
  • 时间:2011-03-22 21:35:35
  •  标签:
  • .net

我帮助那些需要向客户寄送加密价值的人。 客户没有具体说明环流模式、dding或如何生成钥匙。 他们只是说:

Then, encrypt this string using AES encryptions with a key size of 256, a vector of length zero (or length 16 byte array if in dotnet) and the key of "XXX".

其中30个钥匙为19个。 我假定他们重新使用。 NET自提到以来。 任何人都知道。 NET知道他们可能建议如何仅仅针对钥匙的19个特性行事? 我们熟悉加密,并将在我们的一边使用 Java。 然而,如果无法知道如何构筑阿片环流钥匙和什么环流模式和dding子,我们就能够走得更远。 客户没有非常迅速地回答我们的问题,因此我认为我试图在此问。 感谢!

最佳回答

蚊帐内任何Aes级的构造或方法中,都含有作为钥匙的str。 钥匙被指定为一阵列,因此,阵列的长度等于主要尺寸/8。

人们希望,它们将使用一种共同的散列算法来产生19个特性显示的关键。 最好的床位很可能是沙256英寸。

仅让你们知道在互联网上会看什么。

public void InitializeCrypto()
      {
           var utf8 = new UTF8Encoding();
           var hash = new SHA256CryptoServiceProvider();
           var aes = new AesCryptoServiceProvider();
           var iv = new byte[16];

           Array.Clear(iv, 0, iv.Length);
           string key = "Some19CharacterString";
           var utf8Bytes = utf8.GetBytes(key);
           aes.IV = iv;
           aes.KeySize = 256;
           aes.Key = hash.ComputeHash(utf8Bytes);
           //Do crypto work

      }
问题回答

暂无回答




相关问题
Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How do I compare two decimals to 10 decimal places?

I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....

Exception practices when creating a SynchronizationContext?

I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...

Show running instance in single instance application

I am building an application with C#. I managed to turn this into a single instance application by checking if the same process is already running. Process[] pname = Process.GetProcessesByName("...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签