Lines Matching refs:BigNum
39 use crate::bn::{BigNum, BigNumRef};
490 /// Integers in ASN.1 may include BigNum, int64 or uint64. BigNum implementation
539 /// Converts the integer to a `BigNum`.
541 pub fn to_bn(&self) -> Result<BigNum, ErrorStack> {
544 .map(|p| BigNum::from_ptr(p))
781 use crate::bn::BigNum;
784 /// Tests conversion between BigNum and Asn1Integer.
787 fn roundtrip(bn: BigNum) {
792 roundtrip(BigNum::from_dec_str("1000000000000000000000000000000000").unwrap());
793 roundtrip(-BigNum::from_dec_str("1000000000000000000000000000000000").unwrap());
794 roundtrip(BigNum::from_u32(1234).unwrap());
795 roundtrip(-BigNum::from_u32(1234).unwrap());
862 let a = Asn1Integer::from_bn(&BigNum::from_dec_str("42").unwrap()).unwrap();
873 let a = Asn1Integer::from_bn(&BigNum::from_dec_str("42").unwrap()).unwrap();
874 let b = Asn1Integer::from_bn(&BigNum::from_dec_str("42").unwrap()).unwrap();
875 let c = Asn1Integer::from_bn(&BigNum::from_dec_str("43").unwrap()).unwrap();