| 1436 | } |
| 1437 | |
| 1438 | void Integer::BERDecode(const byte *input) |
| 1439 | { |
| 1440 | if (*input++ != INTEGER) |
| 1441 | BERDecodeError(); |
| 1442 | int bc; |
| 1443 | if (!(*input & 0x80)) |
| 1444 | bc = *input++; |
| 1445 | else |
| 1446 | { |
| 1447 | int lengthBytes = *input++ & 0x7f; |
| 1448 | if (lengthBytes > 2) |
| 1449 | BERDecodeError(); |
| 1450 | bc = *input++; |
| 1451 | if (lengthBytes > 1) |
| 1452 | bc = (bc << 8) | *input++; |
| 1453 | } |
| 1454 | Decode(input, bc, SIGNED); |
| 1455 | } |
| 1456 | |
| 1457 | void Integer::BERDecode(BufferedTransformation &bt) |
| 1458 | { |
no test coverage detected