DesCipherTest.cs 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using Renci.SshNet.Security.Cryptography.Ciphers;
  3. using Renci.SshNet.Tests.Common;
  4. namespace Renci.SshNet.Tests.Classes.Security.Cryptography.Ciphers
  5. {
  6. /// <summary>
  7. /// Implements DES cipher algorithm.
  8. /// </summary>
  9. [TestClass]
  10. public class DesCipherTest : TestBase
  11. {
  12. /// <summary>
  13. ///A test for DesCipher Constructor
  14. ///</summary>
  15. [TestMethod]
  16. [Ignore] // placeholder for actual test
  17. public void DesCipherConstructorTest()
  18. {
  19. byte[] key = null; // TODO: Initialize to an appropriate value
  20. CipherMode mode = null; // TODO: Initialize to an appropriate value
  21. CipherPadding padding = null; // TODO: Initialize to an appropriate value
  22. DesCipher target = new DesCipher(key, mode, padding);
  23. Assert.Inconclusive("TODO: Implement code to verify target");
  24. }
  25. /// <summary>
  26. ///A test for DecryptBlock
  27. ///</summary>
  28. [TestMethod]
  29. [Ignore] // placeholder for actual test
  30. public void DecryptBlockTest()
  31. {
  32. byte[] key = null; // TODO: Initialize to an appropriate value
  33. CipherMode mode = null; // TODO: Initialize to an appropriate value
  34. CipherPadding padding = null; // TODO: Initialize to an appropriate value
  35. DesCipher target = new DesCipher(key, mode, padding); // TODO: Initialize to an appropriate value
  36. byte[] inputBuffer = null; // TODO: Initialize to an appropriate value
  37. int inputOffset = 0; // TODO: Initialize to an appropriate value
  38. int inputCount = 0; // TODO: Initialize to an appropriate value
  39. byte[] outputBuffer = null; // TODO: Initialize to an appropriate value
  40. int outputOffset = 0; // TODO: Initialize to an appropriate value
  41. int expected = 0; // TODO: Initialize to an appropriate value
  42. int actual;
  43. actual = target.DecryptBlock(inputBuffer, inputOffset, inputCount, outputBuffer, outputOffset);
  44. Assert.AreEqual(expected, actual);
  45. Assert.Inconclusive("Verify the correctness of this test method.");
  46. }
  47. /// <summary>
  48. ///A test for EncryptBlock
  49. ///</summary>
  50. [TestMethod]
  51. [Ignore] // placeholder for actual test
  52. public void EncryptBlockTest()
  53. {
  54. byte[] key = null; // TODO: Initialize to an appropriate value
  55. CipherMode mode = null; // TODO: Initialize to an appropriate value
  56. CipherPadding padding = null; // TODO: Initialize to an appropriate value
  57. DesCipher target = new DesCipher(key, mode, padding); // TODO: Initialize to an appropriate value
  58. byte[] inputBuffer = null; // TODO: Initialize to an appropriate value
  59. int inputOffset = 0; // TODO: Initialize to an appropriate value
  60. int inputCount = 0; // TODO: Initialize to an appropriate value
  61. byte[] outputBuffer = null; // TODO: Initialize to an appropriate value
  62. int outputOffset = 0; // TODO: Initialize to an appropriate value
  63. int expected = 0; // TODO: Initialize to an appropriate value
  64. int actual;
  65. actual = target.EncryptBlock(inputBuffer, inputOffset, inputCount, outputBuffer, outputOffset);
  66. Assert.AreEqual(expected, actual);
  67. Assert.Inconclusive("Verify the correctness of this test method.");
  68. }
  69. }
  70. }