GitSharp.Core.ObjectId.FromHexString C# (CSharp) Method

FromHexString() public static method

public static FromHexString ( byte bs, int p ) : ObjectId
bs byte
p int
return ObjectId
        public static ObjectId FromHexString(byte[] bs, int p)
        {
            try
            {
                int a = RawParseUtils.parseHexInt32(bs, p);
                int b = RawParseUtils.parseHexInt32(bs, p + 8);
                int c = RawParseUtils.parseHexInt32(bs, p + 16);
                int d = RawParseUtils.parseHexInt32(bs, p + 24);
                int e = RawParseUtils.parseHexInt32(bs, p + 32);
                return new ObjectId(a, b, c, d, e);
            }
            catch (IndexOutOfRangeException e)
            {
                throw new InvalidObjectIdException(bs, p, Constants.OBJECT_ID_STRING_LENGTH, e);
            }
        }