X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fcore%2Futil%2FEncoder.cpp;h=8daa6665c1fe5fe53ba1289a7a076a1e02ec6d16;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hp=b126a39ba6205ec7a061bffa90731a4257916d6f;hpb=93366a0bda79e6fd6e7dad6316bfcf8cc82f5731;p=anna.git diff --git a/source/core/util/Encoder.cpp b/source/core/util/Encoder.cpp index b126a39..8daa666 100644 --- a/source/core/util/Encoder.cpp +++ b/source/core/util/Encoder.cpp @@ -17,12 +17,12 @@ using namespace std; using namespace anna; void Encoder::initialize() -throw() { +{ srand(functions::second()); } const EncodedData& Encoder::encode(const DataBlock& data) -throw(RuntimeException) { +noexcept(false) { DES_cblock key [3]; DES_key_schedule* skey [3]; @@ -58,7 +58,7 @@ throw(RuntimeException) { // (1) Elimina los 8 primeros bytes que tuvimos que poner de relleno en la codificacion. //------------------------------------------------------------------------------------------------- const DataBlock& Encoder::decode(const EncodedData& data) -throw(RuntimeException) { +noexcept(false) { if(data.a_realSize <= 0) { string msg("anna::Encoder::encode | Cannot decode an uninitialized data"); throw RuntimeException(msg, ANNA_FILE_LOCATION); @@ -93,7 +93,7 @@ throw(RuntimeException) { // 'const_cast (data).a_value.remove (sizeof (DES_cblock));' //------------------------------------------------------------------------------------------------- DataBlock& Encoder::setDataBlock(const DataBlock& other) -throw(RuntimeException) { +noexcept(false) { DataBlock& value = a_data.a_value; int r; value.clear();