24 memcpy(&hash, &script[3], 20);
32 if (script.
size() == 23 && script[0] ==
OP_HASH160 && script[1] == 20
34 memcpy(&hash, &script[2], 20);
43 && (script[1] == 0x02 || script[1] == 0x03)) {
44 pubkey.
Set(&script[1], &script[34]);
48 && script[1] == 0x04) {
49 pubkey.
Set(&script[1], &script[66]);
61 memcpy(&out[1], &keyID, 20);
68 memcpy(&out[1], &scriptID, 20);
74 memcpy(&out[1], &pubkey[1], 32);
75 if (pubkey[0] == 0x02 || pubkey[0] == 0x03) {
78 }
else if (pubkey[0] == 0x04) {
79 out[0] = 0x04 | (pubkey[64] & 0x01);
88 if (nSize == 0 || nSize == 1)
90 if (nSize == 2 || nSize == 3 || nSize == 4 || nSize == 5)
103 memcpy(&script[3], in.
data(), 20);
111 memcpy(&script[2], in.
data(), 20);
119 memcpy(&script[2], in.
data(), 32);
124 unsigned char vch[33] = {};
126 memcpy(&vch[1], in.data(), 32);
127 CPubKey pubkey(&vch[0], &vch[33]);
133 memcpy(&script[1], pubkey.
begin(), 65);
154 while (((n % 10) == 0) && e < 9) {
162 return 1 + (n*9 + d - 1)*10 + e;
164 return 1 + (n - 1)*10 + 9;