Convert a 256-bit number represented as 16 uint16_t's to signed30 notation. */
| 1004 | |
| 1005 | /* Convert a 256-bit number represented as 16 uint16_t's to signed30 notation. */ |
| 1006 | static void uint16_to_signed30(secp256k1_modinv32_signed30* out, const uint16_t* in) { |
| 1007 | int i; |
| 1008 | memset(out->v, 0, sizeof(out->v)); |
| 1009 | for (i = 0; i < 256; ++i) { |
| 1010 | out->v[i / 30] |= (int32_t)(((in[i >> 4]) >> (i & 15)) & 1) << (i % 30); |
| 1011 | } |
| 1012 | } |
| 1013 | |
| 1014 | /* Convert a 256-bit number in signed30 notation to a representation as 16 uint16_t's. */ |
| 1015 | static void signed30_to_uint16(uint16_t* out, const secp256k1_modinv32_signed30* in) { |
no outgoing calls
no test coverage detected