Lines Matching refs:bn
1452 ScopedBIGNUM bn; in test_dec2bn() local
1453 int ret = DecimalToBIGNUM(&bn, "0"); in test_dec2bn()
1454 if (ret != 1 || !BN_is_zero(bn.get()) || BN_is_negative(bn.get())) { in test_dec2bn()
1459 ret = DecimalToBIGNUM(&bn, "256"); in test_dec2bn()
1460 if (ret != 3 || !BN_is_word(bn.get(), 256) || BN_is_negative(bn.get())) { in test_dec2bn()
1465 ret = DecimalToBIGNUM(&bn, "-42"); in test_dec2bn()
1466 if (ret != 3 || !BN_abs_is_word(bn.get(), 42) || !BN_is_negative(bn.get())) { in test_dec2bn()
1471 ret = DecimalToBIGNUM(&bn, "-0"); in test_dec2bn()
1472 if (ret != 2 || !BN_is_zero(bn.get()) || BN_is_negative(bn.get())) { in test_dec2bn()
1477 ret = DecimalToBIGNUM(&bn, "42trailing garbage is ignored"); in test_dec2bn()
1478 if (ret != 2 || !BN_abs_is_word(bn.get(), 42) || BN_is_negative(bn.get())) { in test_dec2bn()
1494 ScopedBIGNUM bn; in test_hex2bn() local
1495 int ret = HexToBIGNUM(&bn, "0"); in test_hex2bn()
1496 if (ret != 1 || !BN_is_zero(bn.get()) || BN_is_negative(bn.get())) { in test_hex2bn()
1501 ret = HexToBIGNUM(&bn, "256"); in test_hex2bn()
1502 if (ret != 3 || !BN_is_word(bn.get(), 0x256) || BN_is_negative(bn.get())) { in test_hex2bn()
1507 ret = HexToBIGNUM(&bn, "-42"); in test_hex2bn()
1508 if (ret != 3 || !BN_abs_is_word(bn.get(), 0x42) || !BN_is_negative(bn.get())) { in test_hex2bn()
1513 ret = HexToBIGNUM(&bn, "-0"); in test_hex2bn()
1514 if (ret != 2 || !BN_is_zero(bn.get()) || BN_is_negative(bn.get())) { in test_hex2bn()
1519 ret = HexToBIGNUM(&bn, "abctrailing garbage is ignored"); in test_hex2bn()
1520 if (ret != 3 || !BN_is_word(bn.get(), 0xabc) || BN_is_negative(bn.get())) { in test_hex2bn()
1537 ScopedBIGNUM bn = ASCIIToBIGNUM("0"); in test_asc2bn() local
1538 if (!bn || !BN_is_zero(bn.get()) || BN_is_negative(bn.get())) { in test_asc2bn()
1543 bn = ASCIIToBIGNUM("256"); in test_asc2bn()
1544 if (!bn || !BN_is_word(bn.get(), 256) || BN_is_negative(bn.get())) { in test_asc2bn()
1549 bn = ASCIIToBIGNUM("-42"); in test_asc2bn()
1550 if (!bn || !BN_abs_is_word(bn.get(), 42) || !BN_is_negative(bn.get())) { in test_asc2bn()
1555 bn = ASCIIToBIGNUM("0x1234"); in test_asc2bn()
1556 if (!bn || !BN_is_word(bn.get(), 0x1234) || BN_is_negative(bn.get())) { in test_asc2bn()
1561 bn = ASCIIToBIGNUM("0X1234"); in test_asc2bn()
1562 if (!bn || !BN_is_word(bn.get(), 0x1234) || BN_is_negative(bn.get())) { in test_asc2bn()
1567 bn = ASCIIToBIGNUM("-0xabcd"); in test_asc2bn()
1568 if (!bn || !BN_abs_is_word(bn.get(), 0xabcd) || !BN_is_negative(bn.get())) { in test_asc2bn()
1573 bn = ASCIIToBIGNUM("-0"); in test_asc2bn()
1574 if (!bn || !BN_is_zero(bn.get()) || BN_is_negative(bn.get())) { in test_asc2bn()
1579 bn = ASCIIToBIGNUM("123trailing garbage is ignored"); in test_asc2bn()
1580 if (!bn || !BN_is_word(bn.get(), 123) || BN_is_negative(bn.get())) { in test_asc2bn()
1589 ScopedBIGNUM bn(BN_new()); in test_rand() local
1590 if (!bn) { in test_rand()
1596 if (!BN_rand(bn.get(), 0, 0 /* top */, 0 /* bottom */) || in test_rand()
1597 !BN_is_zero(bn.get())) { in test_rand()
1601 if (!BN_rand(bn.get(), 0, 1 /* top */, 1 /* bottom */) || in test_rand()
1602 !BN_is_zero(bn.get())) { in test_rand()
1607 if (!BN_rand(bn.get(), 1, 0 /* top */, 0 /* bottom */) || in test_rand()
1608 !BN_is_word(bn.get(), 1)) { in test_rand()
1612 if (!BN_rand(bn.get(), 1, 1 /* top */, 0 /* bottom */) || in test_rand()
1613 !BN_is_word(bn.get(), 1)) { in test_rand()
1617 if (!BN_rand(bn.get(), 1, -1 /* top */, 1 /* bottom */) || in test_rand()
1618 !BN_is_word(bn.get(), 1)) { in test_rand()
1623 if (!BN_rand(bn.get(), 2, 1 /* top */, 0 /* bottom */) || in test_rand()
1624 !BN_is_word(bn.get(), 3)) { in test_rand()