Apply clang-format-10
@@ -101,16 +101,14 @@ void shift_stark_hash(FieldElement hash){
uint32_t bits_count = bits256(&hash256);
if (bits_count < 248) {
return;
- }
- else if(bits_count >= 248 && bits_count%8 >= 1 && bits_count%8 <= 4){
+ } else if (bits_count >= 248 && bits_count % 8 >= 1 && bits_count % 8 <= 4) {
shiftl256(&hash256, 4, &final_hash256);
write_u64_be(hash, UPPER(UPPER_P((&final_hash256))));
write_u64_be(hash + 8, LOWER(UPPER_P((&final_hash256))));
write_u64_be(hash + 16, UPPER(LOWER_P((&final_hash256))));
write_u64_be(hash + 24, LOWER(LOWER_P((&final_hash256))));
return;
- }
- else{
+ } else {
THROW(0x6A80);
}
}
@@ -141,7 +139,7 @@ int stark_sign(uint8_t *signature, /* out */
PRINTF("Pedersen hash 2 %.*H\n", 32, hash);
#ifdef TARGET_NANOX
shift_stark_hash(hash);
-#endif // TARGET_NANOX
+#endif
cx_ecfp_init_private_key(CX_CURVE_Stark256, privateKeyData, 32, &privateKey);
io_seproxyhal_io_heartbeat();
int signatureLength = cx_ecdsa_sign(&privateKey,
