Integers.cs 472 B

123456789101112131415161718192021
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. using System;
  3. namespace Org.BouncyCastle.Utilities
  4. {
  5. public abstract class Integers
  6. {
  7. public static int RotateLeft(int i, int distance)
  8. {
  9. return (i << distance) ^ (int)((uint)i >> -distance);
  10. }
  11. public static int RotateRight(int i, int distance)
  12. {
  13. return (int)((uint)i >> distance) ^ (i << -distance);
  14. }
  15. }
  16. }
  17. #endif