Lines Matching refs:bn
52 bigNum bn, in BnFromBytes() argument
65 if(bn == NULL) in BnFromBytes()
69 pAssert(BnGetAllocated(bn) >= size); in BnFromBytes()
74 bn->d[size - 1] = 0; in BnFromBytes()
78 pTo = (BYTE *)bn->d; in BnFromBytes()
88 bn->d[t] = SWAP_CRYPT_WORD(bn->d[t]); in BnFromBytes()
92 BnSetTop(bn, size); in BnFromBytes()
93 return bn; in BnFromBytes()
102 bigNum bn, // OUT: in BnFrom2B() argument
107 return BnFromBytes(bn, a2B->buffer, a2B->size); in BnFrom2B()
110 BnSetTop(bn, 0); // Function accepts NULL in BnFrom2B()
118 bigNum bn, // OUT: in BnFromHex() argument
127 BYTE *d = (BYTE *)&(bn->d[0]); in BnFromHex()
129 pAssert(bn && hex); in BnFromHex()
132 if((i == 0) || (wordCount >= BnGetAllocated(bn))) in BnFromHex()
133 BnSetWord(bn, 0); in BnFromHex()
136 bn->d[wordCount - 1] = 0; in BnFromHex()
151 bn->d[i] = SWAP_CRYPT_WORD(bn->d[i]); in BnFromHex()
153 BnSetTop(bn, wordCount); in BnFromHex()
154 return bn; in BnFromHex()
170 bigConst bn, in BnToBytes() argument
183 pAssert(bn && buffer && size); in BnToBytes()
185 requiredSize = (BnSizeInBits(bn) + 7) / 8; in BnToBytes()
197 BnCopy(bnL, bn); in BnToBytes()
201 bn = (bigConst)bnL; in BnToBytes()
210 pFrom = (BYTE *)(&bn->d[0]) + requiredSize - 1; in BnToBytes()
233 bigConst bn, // IN: in BnTo2B() argument
239 if(bn && a2B) in BnTo2B()
242 return BnToBytes(bn, a2B->buffer, &a2B->size); in BnTo2B()