MCPcopy Create free account
hub / github.com/brichard19/BitCrack / init

Method init

CLKeySearchDevice/CLKeySearchDevice.cpp:187–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187void CLKeySearchDevice::init(const secp256k1::uint256 &start, int compression, const secp256k1::uint256 &stride)
188{
189 if(start.cmp(secp256k1::N) >= 0) {
190 throw KeySearchException("Starting key is out of range");
191 }
192
193 _start = start;
194
195 _stride = stride;
196
197 _compression = compression;
198
199 try {
200 allocateBuffers();
201
202 generateStartingPoints();
203
204 // Set the incrementor
205 secp256k1::ecpoint g = secp256k1::G();
206 secp256k1::ecpoint p = secp256k1::multiplyPoint(secp256k1::uint256((uint64_t)_points ) * _stride, g);
207
208 setIncrementor(p);
209 } catch(cl::CLException ex) {
210 throw KeySearchException(ex.msg);
211 }
212}
213
214void CLKeySearchDevice::doStep()
215{

Callers

nothing calls this directly

Calls 4

KeySearchExceptionClass · 0.85
GFunction · 0.85
uint256Class · 0.85
cmpMethod · 0.80

Tested by

no test coverage detected