Arc4Cipher.cs 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. /// <exception cref="ArgumentNullException"><paramref name="key"/> is null.</exception>
  17. public Arc4Cipher(byte[] key)
  18. : base(key)
  19. {
  20. }
  21. /// <summary>
  22. /// Encrypts the specified region of the input byte array and copies the encrypted data to the specified region of the output byte array.
  23. /// </summary>
  24. /// <param name="inputBuffer">The input data to encrypt.</param>
  25. /// <param name="inputOffset">The offset into the input byte array from which to begin using data.</param>
  26. /// <param name="inputCount">The number of bytes in the input byte array to use as data.</param>
  27. /// <param name="outputBuffer">The output to which to write encrypted data.</param>
  28. /// <param name="outputOffset">The offset into the output byte array from which to begin writing data.</param>
  29. /// <returns>
  30. /// The number of bytes encrypted.
  31. /// </returns>
  32. public override int EncryptBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
  33. {
  34. throw new NotImplementedException();
  35. }
  36. /// <summary>
  37. /// Decrypts the specified region of the input byte array and copies the decrypted data to the specified region of the output byte array.
  38. /// </summary>
  39. /// <param name="inputBuffer">The input data to decrypt.</param>
  40. /// <param name="inputOffset">The offset into the input byte array from which to begin using data.</param>
  41. /// <param name="inputCount">The number of bytes in the input byte array to use as data.</param>
  42. /// <param name="outputBuffer">The output to which to write decrypted data.</param>
  43. /// <param name="outputOffset">The offset into the output byte array from which to begin writing data.</param>
  44. /// <returns>
  45. /// The number of bytes decrypted.
  46. /// </returns>
  47. public override int DecryptBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
  48. {
  49. throw new NotImplementedException();
  50. }
  51. /// <summary>
  52. /// Encrypts the specified input.
  53. /// </summary>
  54. /// <param name="input">The input.</param>
  55. /// <returns></returns>
  56. public override byte[] Encrypt(byte[] input)
  57. {
  58. throw new NotImplementedException();
  59. }
  60. /// <summary>
  61. /// Decrypts the specified input.
  62. /// </summary>
  63. /// <param name="input">The input.</param>
  64. /// <returns></returns>
  65. public override byte[] Decrypt(byte[] input)
  66. {
  67. throw new NotImplementedException();
  68. }
  69. }
  70. }