@@ -205,16 +205,17 @@ namespace nil {
205
205
typename BlueprintFieldType::value_type g = input_state[6 ];
206
206
typename BlueprintFieldType::value_type h = input_state[7 ];
207
207
208
+ nil::marshalling::status_type status;
208
209
std::array<typename BlueprintFieldType::integral_type, 8 > sparse_values {};
209
210
for (std::size_t i = 0 ; i < 4 ; i++) {
210
211
typename BlueprintFieldType::integral_type integral_input_state_sparse =
211
212
typename BlueprintFieldType::integral_type (input_state[i].data );
212
213
std::vector<bool > input_state_sparse (32 );
213
214
{
214
- nil::marshalling::status_type status;
215
215
std::vector<bool > input_state_sparse_all =
216
216
nil::marshalling::pack<nil::marshalling::option::big_endian>(integral_input_state_sparse,
217
217
status);
218
+ THROW_IF_ERROR_STATUS (status, " sha256_process::calculate" );
218
219
std::copy (input_state_sparse_all.end () - 32 , input_state_sparse_all.end (),
219
220
input_state_sparse.begin ());
220
221
}
@@ -230,10 +231,10 @@ namespace nil {
230
231
typename BlueprintFieldType::integral_type (input_state[i].data );
231
232
std::vector<bool > input_state_sparse (32 );
232
233
{
233
- nil::marshalling::status_type status;
234
234
std::vector<bool > input_state_sparse_all =
235
235
nil::marshalling::pack<nil::marshalling::option::big_endian>(integral_input_state_sparse,
236
236
status);
237
+ THROW_IF_ERROR_STATUS (status, " sha256_process::calculate" );
237
238
std::copy (input_state_sparse_all.end () - 32 , input_state_sparse_all.end (),
238
239
input_state_sparse.begin ());
239
240
}
@@ -254,9 +255,9 @@ namespace nil {
254
255
typename BlueprintFieldType::integral_type (message_scheduling_words[(i - row) / 5 + 1 ].data );
255
256
std::vector<bool > a (32 );
256
257
{
257
- nil::marshalling::status_type status;
258
258
std::vector<bool > a_all =
259
259
nil::marshalling::pack<nil::marshalling::option::big_endian>(integral_a, status);
260
+ THROW_IF_ERROR_STATUS (status, " sha256_process::calculate" );
260
261
std::copy (a_all.end () - 32 , a_all.end (), a.begin ());
261
262
}
262
263
@@ -276,9 +277,9 @@ namespace nil {
276
277
typename BlueprintFieldType::integral_type (message_scheduling_words[(i - row) / 5 + 14 ].data );
277
278
std::vector<bool > b (32 );
278
279
{
279
- nil::marshalling::status_type status;
280
280
std::vector<bool > b_all =
281
281
nil::marshalling::pack<nil::marshalling::option::big_endian>(integral_b, status);
282
+ THROW_IF_ERROR_STATUS (status, " sha256_process::calculate" );
282
283
std::copy (b_all.end () - 32 , b_all.end (), b.begin ());
283
284
}
284
285
@@ -313,9 +314,9 @@ namespace nil {
313
314
typename BlueprintFieldType::integral_type (e.data );
314
315
std::vector<bool > e_bits (32 );
315
316
{
316
- nil::marshalling::status_type status;
317
317
std::vector<bool > e_bits_all =
318
318
nil::marshalling::pack<nil::marshalling::option::big_endian>(integral_e, status);
319
+ THROW_IF_ERROR_STATUS (status, " sha256_process::calculate" );
319
320
std::copy (e_bits_all.end () - 32 , e_bits_all.end (), e_bits.begin ());
320
321
}
321
322
@@ -370,9 +371,9 @@ namespace nil {
370
371
typename BlueprintFieldType::integral_type (a.data );
371
372
std::vector<bool > a_bits (32 );
372
373
{
373
- nil::marshalling::status_type status;
374
374
std::vector<bool > a_bits_all =
375
375
nil::marshalling::pack<nil::marshalling::option::big_endian>(integral_a, status);
376
+ THROW_IF_ERROR_STATUS (status, " sha256_process::calculate" );
376
377
std::copy (a_bits_all.end () - 32 , a_bits_all.end (), a_bits.begin ());
377
378
}
378
379
@@ -1386,17 +1387,18 @@ namespace nil {
1386
1387
typename BlueprintFieldType::value_type g = input_state[6 ];
1387
1388
typename BlueprintFieldType::value_type h = input_state[7 ];
1388
1389
1390
+ nil::marshalling::status_type status;
1389
1391
std::array<typename BlueprintFieldType::integral_type, 8 > sparse_values {};
1390
1392
for (std::size_t i = 0 ; i < 4 ; i++) {
1391
1393
assignment.witness (component.W (i), row) = input_state[i];
1392
1394
typename BlueprintFieldType::integral_type integral_input_state_sparse =
1393
1395
typename BlueprintFieldType::integral_type (input_state[i].data );
1394
1396
std::vector<bool > input_state_sparse (32 );
1395
1397
{
1396
- nil::marshalling::status_type status;
1397
1398
std::vector<bool > input_state_sparse_all =
1398
1399
nil::marshalling::pack<nil::marshalling::option::big_endian>(integral_input_state_sparse,
1399
1400
status);
1401
+ THROW_IF_ERROR_STATUS (status, " sha256_process::generate_assignments" );
1400
1402
std::copy (input_state_sparse_all.end () - 32 , input_state_sparse_all.end (),
1401
1403
input_state_sparse.begin ());
1402
1404
}
@@ -1415,10 +1417,10 @@ namespace nil {
1415
1417
typename BlueprintFieldType::integral_type (input_state[i].data );
1416
1418
std::vector<bool > input_state_sparse (32 );
1417
1419
{
1418
- nil::marshalling::status_type status;
1419
1420
std::vector<bool > input_state_sparse_all =
1420
1421
nil::marshalling::pack<nil::marshalling::option::big_endian>(integral_input_state_sparse,
1421
1422
status);
1423
+ THROW_IF_ERROR_STATUS (status, " sha256_process::generate_assignments" );
1422
1424
std::copy (input_state_sparse_all.end () - 32 , input_state_sparse_all.end (),
1423
1425
input_state_sparse.begin ());
1424
1426
}
@@ -1444,9 +1446,9 @@ namespace nil {
1444
1446
assignment.witness (component.W (0 ), i) = message_scheduling_words[(i - row) / 5 + 1 ];
1445
1447
std::vector<bool > a (32 );
1446
1448
{
1447
- nil::marshalling::status_type status;
1448
1449
std::vector<bool > a_all =
1449
1450
nil::marshalling::pack<nil::marshalling::option::big_endian>(integral_a, status);
1451
+ THROW_IF_ERROR_STATUS (status, " sha256_process::generate_assignments" );
1450
1452
std::copy (a_all.end () - 32 , a_all.end (), a.begin ());
1451
1453
}
1452
1454
@@ -1486,9 +1488,9 @@ namespace nil {
1486
1488
typename BlueprintFieldType::integral_type (message_scheduling_words[(i - row) / 5 + 14 ].data );
1487
1489
std::vector<bool > b (32 );
1488
1490
{
1489
- nil::marshalling::status_type status;
1490
1491
std::vector<bool > b_all =
1491
1492
nil::marshalling::pack<nil::marshalling::option::big_endian>(integral_b, status);
1493
+ THROW_IF_ERROR_STATUS (status, " sha256_process::generate_assignments" );
1492
1494
std::copy (b_all.end () - 32 , b_all.end (), b.begin ());
1493
1495
}
1494
1496
@@ -1555,9 +1557,9 @@ namespace nil {
1555
1557
typename BlueprintFieldType::integral_type (e.data );
1556
1558
std::vector<bool > e_bits (32 );
1557
1559
{
1558
- nil::marshalling::status_type status;
1559
1560
std::vector<bool > e_bits_all =
1560
1561
nil::marshalling::pack<nil::marshalling::option::big_endian>(integral_e, status);
1562
+ THROW_IF_ERROR_STATUS (status, " sha256_process::generate_assignments" );
1561
1563
std::copy (e_bits_all.end () - 32 , e_bits_all.end (), e_bits.begin ());
1562
1564
}
1563
1565
@@ -1655,9 +1657,9 @@ namespace nil {
1655
1657
typename BlueprintFieldType::integral_type (a.data );
1656
1658
std::vector<bool > a_bits (32 );
1657
1659
{
1658
- nil::marshalling::status_type status;
1659
1660
std::vector<bool > a_bits_all =
1660
1661
nil::marshalling::pack<nil::marshalling::option::big_endian>(integral_a, status);
1662
+ THROW_IF_ERROR_STATUS (status, " sha256_process::generate_assignments" );
1661
1663
std::copy (a_bits_all.end () - 32 , a_bits_all.end (), a_bits.begin ());
1662
1664
}
1663
1665
0 commit comments