diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-05 18:30:28 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-06 21:53:40 +0800 |
commit | aefb6e5fcf9adc7c58da9ec0454707305f7e9ac9 (patch) | |
tree | 30d17c29abf022cfcde24d13ebbd9285aadeb62b /libevmasm | |
parent | d5cfb17b32147e950a689a507e0d5487dece7e8a (diff) | |
download | dexon-solidity-aefb6e5fcf9adc7c58da9ec0454707305f7e9ac9.tar dexon-solidity-aefb6e5fcf9adc7c58da9ec0454707305f7e9ac9.tar.gz dexon-solidity-aefb6e5fcf9adc7c58da9ec0454707305f7e9ac9.tar.bz2 dexon-solidity-aefb6e5fcf9adc7c58da9ec0454707305f7e9ac9.tar.lz dexon-solidity-aefb6e5fcf9adc7c58da9ec0454707305f7e9ac9.tar.xz dexon-solidity-aefb6e5fcf9adc7c58da9ec0454707305f7e9ac9.tar.zst dexon-solidity-aefb6e5fcf9adc7c58da9ec0454707305f7e9ac9.zip |
Rename dev::sha3 to dev::keccak256
Diffstat (limited to 'libevmasm')
-rw-r--r-- | libevmasm/Assembly.cpp | 2 | ||||
-rw-r--r-- | libevmasm/Assembly.h | 4 | ||||
-rw-r--r-- | libevmasm/KnownState.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index c7822819..450ee6ce 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -296,7 +296,7 @@ AssemblyItem const& Assembly::append(AssemblyItem const& _i) AssemblyItem Assembly::newPushLibraryAddress(string const& _identifier) { - h256 h(dev::sha3(_identifier)); + h256 h(dev::keccak256(_identifier)); m_libraries[h] = _identifier; return AssemblyItem(PushLibraryAddress, h); } diff --git a/libevmasm/Assembly.h b/libevmasm/Assembly.h index af28e220..dae1e1da 100644 --- a/libevmasm/Assembly.h +++ b/libevmasm/Assembly.h @@ -45,11 +45,11 @@ public: AssemblyItem newTag() { return AssemblyItem(Tag, m_usedTags++); } AssemblyItem newPushTag() { return AssemblyItem(PushTag, m_usedTags++); } - AssemblyItem newData(bytes const& _data) { h256 h(sha3(asString(_data))); m_data[h] = _data; return AssemblyItem(PushData, h); } + AssemblyItem newData(bytes const& _data) { h256 h(dev::keccak256(asString(_data))); m_data[h] = _data; return AssemblyItem(PushData, h); } AssemblyItem newSub(Assembly const& _sub) { m_subs.push_back(_sub); return AssemblyItem(PushSub, m_subs.size() - 1); } Assembly const& sub(size_t _sub) const { return m_subs.at(_sub); } Assembly& sub(size_t _sub) { return m_subs.at(_sub); } - AssemblyItem newPushString(std::string const& _data) { h256 h(sha3(_data)); m_strings[h] = _data; return AssemblyItem(PushString, h); } + AssemblyItem newPushString(std::string const& _data) { h256 h(dev::keccak256(_data)); m_strings[h] = _data; return AssemblyItem(PushString, h); } AssemblyItem newPushSubSize(u256 const& _subId) { return AssemblyItem(PushSubSize, _subId); } AssemblyItem newPushLibraryAddress(std::string const& _identifier); diff --git a/libevmasm/KnownState.cpp b/libevmasm/KnownState.cpp index dd269ff4..0b6e0ac5 100644 --- a/libevmasm/KnownState.cpp +++ b/libevmasm/KnownState.cpp @@ -378,7 +378,7 @@ KnownState::Id KnownState::applySha3( for (Id a: arguments) data += toBigEndian(*m_expressionClasses->knownConstant(a)); data.resize(size_t(*l)); - v = m_expressionClasses->find(AssemblyItem(u256(sha3(data)), _location)); + v = m_expressionClasses->find(AssemblyItem(u256(dev::keccak256(data)), _location)); } else v = m_expressionClasses->find(sha3Item, {_start, _length}, true, m_sequenceNumber); |