summary refs log tree commit diff
path: root/crypto/src/pqc/math/linearalgebra/Utils.cs
blob: eb2760f823fc4ebb209617b3e33b062f9a78709b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
namespace Org.BouncyCastle.Pqc.Math.LinearAlgebra
{
    class Utils
    {
        internal static int UnsignedRightBitShiftInt(int a, int b)
        {
            uint tmp = (uint) a;
            tmp >>= b;
            return (int) tmp;
        }

        internal static long UnsignedRightBitShiftLong(long a, int b)
        {
            ulong tmp = (ulong)a;
            tmp >>= b;
            return (long) tmp;
        }
    }
}