MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / ConvertToLong

Method ConvertToLong

src/cryptlib/integer.cpp:1152–1160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1150}
1151
1152long Integer::ConvertToLong() const
1153{
1154 unsigned long value = reg[(unsigned int)0];
1155#ifndef __GNUC__
1156 value += sizeof(value)>WORD_SIZE ? ((unsigned long)reg[1]<<WORD_BITS) : 0;
1157#endif
1158 value = Crop(value, 8*sizeof(value)-1);
1159 return sign==POSITIVE ? value : -long(value);
1160}
1161
1162Integer::Integer(const byte *encodedInteger, unsigned int byteCount, Signedness s)
1163{

Callers 1

LoadMethod · 0.80

Calls 1

CropFunction · 0.85

Tested by

no test coverage detected