18
18
#include <stdint.h>
19
19
#include <string.h>
20
20
21
- #include "uint128.h"
22
- #include "uint256.h"
23
21
#include "tokens.h"
24
22
#include "common_utils.h"
25
23
@@ -32,32 +30,6 @@ void array_hexstr(char *strbuf, const void *bin, unsigned int len) {
32
30
* strbuf = 0 ; // EOS
33
31
}
34
32
35
- void convertUint64BEto128 (const uint8_t * const data , uint32_t length , uint128_t * const target ) {
36
- uint8_t tmp [INT128_LENGTH ];
37
- int64_t value ;
38
-
39
- value = u64_from_BE (data , length );
40
- memset (tmp , ((value < 0 ) ? 0xff : 0 ), sizeof (tmp ) - length );
41
- memmove (tmp + sizeof (tmp ) - length , data , length );
42
- readu128BE (tmp , target );
43
- }
44
-
45
- void convertUint128BE (const uint8_t * const data , uint32_t length , uint128_t * const target ) {
46
- uint8_t tmp [INT128_LENGTH ];
47
-
48
- memset (tmp , 0 , sizeof (tmp ) - length );
49
- memmove (tmp + sizeof (tmp ) - length , data , length );
50
- readu128BE (tmp , target );
51
- }
52
-
53
- void convertUint256BE (const uint8_t * const data , uint32_t length , uint256_t * const target ) {
54
- uint8_t tmp [INT256_LENGTH ];
55
-
56
- memset (tmp , 0 , sizeof (tmp ) - length );
57
- memmove (tmp + sizeof (tmp ) - length , data , length );
58
- readu256BE (tmp , target );
59
- }
60
-
61
33
uint64_t u64_from_BE (const uint8_t * in , uint8_t size ) {
62
34
uint8_t i = 0 ;
63
35
uint64_t res = 0 ;
0 commit comments