2
0

Arc4Cipher.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Renci.SshNet.Security.Cryptography.Ciphers
  6. {
  7. /// <summary>
  8. /// Implements ARCH4 cipher algorithm
  9. /// </summary>
  10. public class Arc4Cipher : StreamCipher
  11. {
  12. /// <summary>
  13. /// Initializes a new instance of the <see cref="Arc4Cipher"/> class.
  14. /// </summary>
  15. /// <param name="key">The key.</param>
  16. public Arc4Cipher(byte[] key)
  17. : base(key)
  18. {
  19. }
  20. /// <summary>
  21. /// Encrypts the specified region of the input byte array and copies the encrypted data to the specified region of the output byte array.
  22. /// </summary>
  23. /// <param name="inputBuffer">The input data to encrypt.</param>
  24. /// <param name="inputOffset">The offset into the input byte array from which to begin using data.</param>
  25. /// <param name="inputCount">The number of bytes in the input byte array to use as data.</param>
  26. /// <param name="outputBuffer">The output to which to write encrypted data.</param>
  27. /// <param name="outputOffset">The offset into the output byte array from which to begin writing data.</param>
  28. /// <returns>
  29. /// The number of bytes encrypted.
  30. /// </returns>
  31. public override int EncryptBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
  32. {
  33. throw new NotImplementedException();
  34. }
  35. /// <summary>
  36. /// Decrypts the specified region of the input byte array and copies the decrypted data to the specified region of the output byte array.
  37. /// </summary>
  38. /// <param name="inputBuffer">The input data to decrypt.</param>
  39. /// <param name="inputOffset">The offset into the input byte array from which to begin using data.</param>
  40. /// <param name="inputCount">The number of bytes in the input byte array to use as data.</param>
  41. /// <param name="outputBuffer">The output to which to write decrypted data.</param>
  42. /// <param name="outputOffset">The offset into the output byte array from which to begin writing data.</param>
  43. /// <returns>
  44. /// The number of bytes decrypted.
  45. /// </returns>
  46. public override int DecryptBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
  47. {
  48. throw new NotImplementedException();
  49. }
  50. /// <summary>
  51. /// Encrypts the specified input.
  52. /// </summary>
  53. /// <param name="input">The input.</param>
  54. /// <returns></returns>
  55. public override byte[] Encrypt(byte[] input)
  56. {
  57. throw new NotImplementedException();
  58. }
  59. /// <summary>
  60. /// Decrypts the specified input.
  61. /// </summary>
  62. /// <param name="input">The input.</param>
  63. /// <returns></returns>
  64. public override byte[] Decrypt(byte[] input)
  65. {
  66. throw new NotImplementedException();
  67. }
  68. }
  69. }