|
@ -55,14 +55,8 @@ bytes Secp256k1::eciesKDF(Secret _z, bytes _s1, unsigned kdByteLen) |
|
|
k.reserve(k.size() + h256::size); |
|
|
k.reserve(k.size() + h256::size); |
|
|
move(digest.begin(), digest.end(), back_inserter(k)); |
|
|
move(digest.begin(), digest.end(), back_inserter(k)); |
|
|
|
|
|
|
|
|
if (ctr[3]++ && ctr[3] != 0) |
|
|
if (++ctr[3] || ++ctr[2] || ++ctr[1] || ++ctr[0]) |
|
|
continue; |
|
|
continue; |
|
|
else if (ctr[2]++ && ctr[2] != 0) |
|
|
|
|
|
continue; |
|
|
|
|
|
else if (ctr[1]++ && ctr[1] != 0) |
|
|
|
|
|
continue; |
|
|
|
|
|
else |
|
|
|
|
|
ctr[0]++; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
k.resize(kdByteLen); |
|
|
k.resize(kdByteLen); |
|
|