IEncryptedValuePadder.cs 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crmf
  5. {
  6. /// <summary>
  7. /// An encrypted value padder is used to make sure that prior to a value been
  8. /// encrypted the data is padded to a standard length.
  9. /// </summary>
  10. public interface IEncryptedValuePadder
  11. {
  12. ///
  13. /// <summary>Return a byte array of padded data.</summary>
  14. ///
  15. /// <param name="data">the data to be padded.</param>
  16. /// <returns>a padded byte array containing data.</returns>
  17. ///
  18. byte[] GetPaddedData(byte[] data);
  19. ///
  20. /// <summary>Return a byte array of with padding removed.</summary>
  21. ///
  22. /// <param name="paddedData">the data to be padded.</param>
  23. /// <returns>an array containing the original unpadded data.</returns>
  24. ///
  25. byte[] GetUnpaddedData(byte[] paddedData);
  26. }
  27. }
  28. #pragma warning restore
  29. #endif