void xmlBranchLoad::DecodeLODs( ticpp::Element* pLODs ) { //считать данные LOD'ов try { ticpp::Iterator< ticpp::Element > pLOD( m_BranchNames.m_sLOD ); for ( pLOD = pLOD.begin( pLODs ); pLOD != pLOD.end(); pLOD++ ) { int iNum = -1; pLOD->GetAttribute( m_BranchNames.m_sNum , &iNum ); pLOD->GetAttribute( m_BranchNames.m_sAlfaTest , &m_pData->m_vBranch[ iNum ].m_fAlfa ); //считать координаты точки DecodePoint( pLOD->FirstChildElement( m_BranchNames.m_sVertexs ) , iNum ); //считать индексы DecodeStrips( pLOD->FirstChildElement( m_BranchNames.m_sStrips ) , iNum ); } } catch( ticpp::Exception& ex ) { //If any function has an error, execution will enter here. // Report the error std::cout << ex.what(); } }
EC2N::Point EC2N::BERDecodePoint(BufferedTransformation &bt) const { SecByteBlock str; BERDecodeOctetString(bt, str); Point P; if (!DecodePoint(P, str, str.size)) BERDecodeError(); return P; }
Ed25519 () { q = CryptoPP::Integer::Power2 (255) - CryptoPP::Integer (19); // 2^255-19 l = CryptoPP::Integer::Power2 (252) + CryptoPP::Integer ("27742317777372353535851937790883648493"); // 2^252 + 27742317777372353535851937790883648493 d = CryptoPP::Integer (-121665) * CryptoPP::Integer (121666).InverseMod (q); // -121665/121666 I = a_exp_b_mod_c (CryptoPP::Integer::Two (), (q - CryptoPP::Integer::One ()).DividedBy (4), q); B = DecodePoint (CryptoPP::Integer (4)*CryptoPP::Integer (5).InverseMod (q)); }
bool EC2N::DecodePoint(EC2N::Point &P, const byte *encodedPoint, unsigned int encodedPointLen) const { StringStore store(encodedPoint, encodedPointLen); return DecodePoint(P, store, encodedPointLen); }
CryptoPP::ECP::Point DecodePublicKey (const uint8_t * key) const { return DecodePoint (CryptoPP::Integer (key, 32)); }
bool ECP::DecodePoint(ECP::Point &P, const byte *encodedPoint, size_t encodedPointLen) const { StringStore store(encodedPoint, encodedPointLen); return DecodePoint(P, store, encodedPointLen); }