/dports/security/p5-CryptX/CryptX-0.075/t/ |
H A D | digest_keccak256.t | 18 is( keccak256("A","A","A"), pack("H*","2070504003a07b4713d783ae7a6642ab3b959b7c575c6e4fa4f33eb743db… 20 is( keccak256_b64("A","A","A"), "IHBQQAOge0cT14OuemZCqzuVm3xXXG5PpPM+t0PbYxo=", 'keccak256 (base64/… 21 is( keccak256_b64u("A","A","A"), "IHBQQAOge0cT14OuemZCqzuVm3xXXG5PpPM-t0PbYxo", 'keccak256 (base64u… 30 is( keccak256(""), pack("H*","c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"), '… 31 …_hex(""), "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", 'keccak256 (hex/1)'); 32 is( keccak256_b64(""), "xdJGAYb3IzySfn2y3McDwOUAtlPKgic7e/rYBF2FpHA=", 'keccak256 (base64/1)'); 39 is( keccak256("123"), pack("H*","64e604787cbf194841e7b68d7cd28786f6c9a0a3ab9f8b0a0e87cb4387ab0107")… 40 …x("123"), "64e604787cbf194841e7b68d7cd28786f6c9a0a3ab9f8b0a0e87cb4387ab0107", 'keccak256 (hex/2)'); 41 is( keccak256_b64("123"), "ZOYEeHy/GUhB57aNfNKHhvbJoKOrn4sKDofLQ4erAQc=", 'keccak256 (base64/2)'); 48 is( keccak256("test\0test\0test\n"), pack("H*","fbc121310d505fb7172a28e0e9e8c7d2976c9f63a739fe60bc2… [all …]
|
/dports/lang/solidity/solidity_0.8.11/test/libsolidity/semanticTests/abiencodedecode/ |
H A D | abi_encode_call_is_consistent.sol | 44 assert(keccak256(fSignatureFromLiteral()) == keccak256(fSignatureFromLiteralCall())); 45 assert(keccak256(fSignatureFromMemory()) == keccak256(fSignatureFromMemoryCall())); 46 assert(keccak256(fSignatureFromMemoryCall()) == keccak256(fSignatureFromMemorys())); 47 assert(keccak256(fPointerCall()) == keccak256(fSignatureFromLiteral())); 48 assert(keccak256(fLocalPointerCall()) == keccak256(fSignatureFromLiteral())); 49 assert(keccak256(fReturnedFunctionPointer()) == keccak256(fSignatureFromLiteral()));
|
H A D | abi_encode_call.sol | 20 assert(keccak256(bytes(_data.name)) == keccak256("StructName")); 21 assert(keccak256(_data.someBytes) == keccak256(bytes("1234"))); 24 assert(keccak256(bytes(_nameVal)) == keccak256("TestName"));
|
H A D | abi_encode_call_special_args.sol | 34 assert(keccak256(fSignatureFromLiteralNoArgs()) == keccak256(fPointerNoArgs())); 35 assert(keccak256(fSignatureFromLiteralArray()) == keccak256(fPointerArray())); 36 assert(keccak256(fSignatureFromLiteralUint()) == keccak256(fPointerUint()));
|
/dports/lang/solidity/solidity_0.8.11/libsolutil/ |
H A D | Keccak256.h | 35 h256 keccak256(bytesConstRef _input); 38 inline h256 keccak256(bytes const& _input) { return keccak256(bytesConstRef(&_input)); } in keccak256() function 41 inline h256 keccak256(std::string const& _input) { return keccak256(bytesConstRef(_input)); } in keccak256() function 44 template<unsigned N> inline h256 keccak256(FixedHash<N> const& _input) { return keccak256(_input.re… in keccak256() function
|
H A D | SwarmHash.cpp | 42 return keccak256(toLittleEndian(_size) + _data.toBytes()); in swarmHashSimple() 69 return keccak256(_data); in bmtHash() 72 return keccak256( in bmtHash() 101 return keccak256(toLittleEndian(_data.size()) + bmtHash(&dataToHash).asBytes()); in chunkHash()
|
/dports/lang/solidity/solidity_0.8.11/test/libsolutil/ |
H A D | Keccak256.cpp | 35 keccak256(bytes()), in BOOST_AUTO_TEST_CASE() 43 keccak256(bytes(1, '\0')), in BOOST_AUTO_TEST_CASE() 47 keccak256(bytes(2, '\0')), in BOOST_AUTO_TEST_CASE() 51 keccak256(bytes(5, '\0')), in BOOST_AUTO_TEST_CASE() 55 keccak256(bytes(10, '\0')), in BOOST_AUTO_TEST_CASE() 63 keccak256("test"), in BOOST_AUTO_TEST_CASE() 67 keccak256("longer test string"), in BOOST_AUTO_TEST_CASE()
|
/dports/lang/solidity/solidity_0.8.11/test/libsolidity/semanticTests/specialFunctions/ |
H A D | keccak256_optimized.sol | 1 // tests compile-time evaluation of keccak256 on literal strings 4 bytes32 a = keccak256("abcdefghijklmn"); 6 return a == keccak256(s); 8 …bytes32 constant sc = keccak256("abcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghi… 10 …bytes32 a = keccak256("abcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmnabcde… 12 return (a == keccak256(s), sc == keccak256(s));
|
/dports/lang/solidity/solidity_0.8.11/test/libsolidity/smtCheckerTests/abi/ |
H A D | abi_encode_with_sig_hash.sol | 6 assert(keccak256(b1) == keccak256(b2)); 9 assert(keccak256(b1) == keccak256(b3)); // should fail 10 assert(keccak256(b1) != keccak256(b3)); // should fail
|
H A D | abi_encode_with_selector_hash.sol | 6 assert(keccak256(b1) == keccak256(b2)); 9 assert(keccak256(b1) == keccak256(b3)); // should fail 10 assert(keccak256(b1) != keccak256(b3)); // should fail
|
H A D | abi_encode_packed_hash.sol | 6 assert(keccak256(b1) == keccak256(b2)); 9 assert(keccak256(b1) == keccak256(b3)); // should fail
|
/dports/lang/solidity/solidity_0.8.11/test/libsolidity/syntaxTests/constants/ |
H A D | abi_encoding_constant.sol | 2 bytes32 constant a = keccak256(abi.encode(1, 2)); 3 bytes32 constant b = keccak256(abi.encodePacked(uint(1), a)); 4 bytes32 constant c = keccak256(abi.encodeWithSelector(0x12345678, b, 2)); 5 bytes32 constant d = keccak256(abi.encodeWithSignature("f()", 1, 2));
|
H A D | pure_non_rational.sol | 5 uint constant a = 1 / (uint(keccak256([0])[0]) - uint(keccak256([0])[0])); 6 uint constant b = 1 / uint(keccak256([0])); 7 uint constant c = uint(keccak256([0]));
|
/dports/lang/solidity/solidity_0.8.11/test/libsolidity/semanticTests/inlineAssembly/ |
H A D | keccak256_optimizer_cache_bug.sol | 8 sstore(keccak256(0, 32), 234) 9 // A bug in the caching mechanism previously caused keccak256(0, 23) to be the same as 10 // keccak256(0, 32), leading to `data[1] == 123` being true. 11 sstore(add(keccak256(0, 23), 1), 123)
|
/dports/lang/solidity/solidity_0.8.11/test/libsolidity/smtCheckerTests/functions/getters/ |
H A D | bytes.sol | 6 assert(keccak256(a2) == keccak256(str2)); // should hold 7 assert(keccak256(a2) == keccak256('a')); // should fail
|
H A D | string.sol | 6 assert(keccak256(bytes(a1)) == keccak256(bytes(str1))); // should hold 7 assert(keccak256(bytes(a1)) == keccak256('a')); // should fail
|
/dports/lang/solidity/solidity_0.8.11/test/libyul/yulOptimizerTests/loadResolver/ |
H A D | keccak_short.yul | 13 sstore(0, keccak256(0, 31)) 14 sstore(1, keccak256(0, 30)) 15 sstore(2, keccak256(0, 1)) 16 sstore(2, keccak256(0, 0))
|
/dports/lang/solidity/solidity_0.8.11/test/compilationTests/corion/ |
H A D | moduleHandler.sol | 120 bytes32 _name = keccak256(bytes(name)); 154 if ( ! ( _found && modules[_id].name == keccak256('Publisher') )) { 193 if ( ! ( _found && modules[_id].name == keccak256('Publisher') )) { 212 if ( ! ( _found && modules[_id].name == keccak256('Publisher') )) { 251 require( _success && _found && modules[_id].name == keccak256('Token') ); 270 require( _success && _found && modules[_id].name == keccak256('Schelling') ); 290 if ( ! ( _found && modules[_id].name == keccak256('Publisher') )) { 356 require( _success && _found && modules[_id].name == keccak256('Provider') ); 388 require( _success && _found && modules[_id].name == keccak256('Provider') ); 403 require( _success && _found && modules[_id].name == keccak256('Schelling') ); [all …]
|
/dports/lang/solidity/solidity_0.8.11/test/libsolidity/semanticTests/array/copying/ |
H A D | array_of_function_external_storage_to_storage_dynamic.sol | 30 assert(keccak256(abi.encode(externalArray0)) != keccak256(abi.encode(externalArray1))); 32 return keccak256(abi.encode(externalArray0)) == keccak256(abi.encode(externalArray1));
|
H A D | array_of_function_external_storage_to_storage_dynamic_different_mutability.sol | 32 …assert(keccak256(abi.encodePacked(externalArray0)) != keccak256(abi.encodePacked(externalArray1))); 34 … return keccak256(abi.encodePacked(externalArray0)) == keccak256(abi.encodePacked(externalArray1));
|
/dports/lang/solidity/solidity_0.8.11/test/libsolidity/semanticTests/various/ |
H A D | code_access_content.sol | 9 codeHash := keccak256(mload(0x40), size) 19 bytes32 runtimeHash = keccak256(type(D).runtimeCode); 25 otherHash := keccak256(mload(0x40), size) 34 bytes32 creationHash = keccak256(type(D).creationCode);
|
/dports/lang/solidity/solidity_0.8.11/test/libyul/yulOptimizerTests/expressionSimplifier/ |
H A D | not_applied_removes_non_constant_and_not_movable.yul | 2 // keccak256 is not movable. 5 let a := div(keccak256(0, 0), 0) 16 // pop(keccak256(_2, _2))
|
/dports/lang/solidity/solidity_0.8.11/test/libsolidity/semanticTests/array/delete/ |
H A D | delete_storage_array.sol | 17 sstore(keccak256(0, 32), 234) 18 sstore(add(keccak256(0, 32), 1), 123) 31 ret := sload(keccak256(0, 32))
|
/dports/lang/solidity/solidity_0.8.11/test/libsolidity/smtCheckerTests/external_calls/ |
H A D | external_reentrancy_crypto.sol | 13 kec = keccak256(data); 17 bytes32 _kec = keccak256(data); 19 assert(kec == keccak256(_data)); // should fail
|
/dports/lang/solidity/solidity_0.8.11/test/libsolidity/syntaxTests/globalFunctions/ |
H A D | keccak256_with_wrong_arg_count.sol | 3 require(keccak256() != 0); 4 require(keccak256(uint(1)) != 0); 5 require(keccak256(uint(1), uint(2)) != 0);
|