Skip to content

Commit

Permalink
remove commented code (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
larshp authored Apr 12, 2024
1 parent 300aad2 commit e3405e5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 22 deletions.
2 changes: 1 addition & 1 deletion abaplint.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
},
"cloud_types": true,
"colon_missing_space": true,
"commented_code": false,
"commented_code": true,
"constructor_visibility_public": true,
"contains_tab": true,
"definitions_top": true,
Expand Down
11 changes: 3 additions & 8 deletions src/integer/zcl_abappgp_integer.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ ENDCLASS.



CLASS ZCL_ABAPPGP_INTEGER IMPLEMENTATION.
CLASS zcl_abappgp_integer IMPLEMENTATION.


METHOD add.
Expand Down Expand Up @@ -291,8 +291,8 @@ CLASS ZCL_ABAPPGP_INTEGER IMPLEMENTATION.
gv_length = 4.

* TY_SPLIT = p LENGTH 16 DECIMALS 0
* gv_max = 1000000000000000.
* gv_length = 15.
* gv_max = 1000000000000000
* gv_length = 15

ENDMETHOD.

Expand Down Expand Up @@ -370,11 +370,9 @@ CLASS ZCL_ABAPPGP_INTEGER IMPLEMENTATION.
ENDIF.

DO.
* WRITE: / .
lv_iterations = lv_iterations + 1.

lo_middle = lo_high_guess->clone( )->subtract( lo_low_guess )->divide_by_2( ).
* WRITE: / 'middle', lo_middle->to_string( ).

IF lo_middle->is_zero( ) = abap_true.
lo_tmp = lo_high_guess->clone( )->multiply( io_integer ).
Expand All @@ -392,8 +390,6 @@ CLASS ZCL_ABAPPGP_INTEGER IMPLEMENTATION.
lo_guess = lo_high_guess->clone( )->subtract( lo_middle ).
lo_tmp = lo_guess->clone( )->multiply( io_integer ).
IF lo_tmp->is_ge( me ) = abap_true.
* WRITE: / 'tmp', lo_tmp->to_string( ), 'guess', lo_guess->to_string( ).
* WRITE: / 'move high to', lo_guess->to_string( ).
lo_high_guess = lo_guess.
CONTINUE.
ENDIF.
Expand All @@ -402,7 +398,6 @@ CLASS ZCL_ABAPPGP_INTEGER IMPLEMENTATION.
lo_guess = lo_low_guess->clone( )->add( lo_middle ).
lo_tmp = lo_guess->clone( )->multiply( io_integer ).
IF lo_tmp->is_le( me ) = abap_true.
* WRITE: / 'move low to', lo_guess->to_string( ).
lo_low_guess = lo_guess.
ENDIF.

Expand Down
7 changes: 1 addition & 6 deletions src/integer/zcl_abappgp_montgomery.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ENDCLASS.



CLASS ZCL_ABAPPGP_MONTGOMERY IMPLEMENTATION.
CLASS zcl_abappgp_montgomery IMPLEMENTATION.


METHOD build.
Expand Down Expand Up @@ -112,22 +112,17 @@ CLASS ZCL_ABAPPGP_MONTGOMERY IMPLEMENTATION.
lo_tmp TYPE REF TO zcl_abappgp_integer2.


* ASSERT NOT io_x->get_integer( )->is_gt( mo_modulus2 ) = abap_true.
* ASSERT NOT io_y->get_integer( )->is_gt( mo_modulus2 ) = abap_true.

lo_product = io_x->get_integer( )->clone( )->multiply_karatsuba( io_y->get_integer( ) ).

lo_tmp = lo_product->clone( )->and( mo_mask )->multiply_karatsuba( mo_factor )->and( mo_mask ).

lo_tmp->multiply_karatsuba( mo_modulus2 ).

* ->clone( )
lo_reduced = lo_product->add( lo_tmp )->shift_right( mv_bits ).

IF lo_reduced->is_gt( mo_modulus2 ) = abap_true.
lo_reduced->subtract( mo_modulus2 ).
ENDIF.
* ASSERT NOT lo_reduced->is_gt( mo_modulus2 ) = abap_true.

CREATE OBJECT ro_result
EXPORTING
Expand Down
4 changes: 0 additions & 4 deletions src/integer/zcl_abappgp_prime.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,6 @@ CLASS zcl_abappgp_prime IMPLEMENTATION.
lo_a = lo_random->random( ).
ASSERT lo_a->is_one( ) = abap_false.

* DATA(lv_a) = lo_a->to_string( ).
* DATA(lv_d) = lo_d->to_string( ).
* DATA(lv_n) = io_n->to_string( ).

lo_x = lo_a->modular_pow_montgomery( io_exponent = lo_d
io_modulus = io_n ).

Expand Down
4 changes: 2 additions & 2 deletions src/pgp/zcl_abappgp_packet_list.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ENDCLASS.



CLASS ZCL_ABAPPGP_PACKET_LIST IMPLEMENTATION.
CLASS zcl_abappgp_packet_list IMPLEMENTATION.


METHOD binary_to_tag.
Expand Down Expand Up @@ -110,7 +110,7 @@ CLASS ZCL_ABAPPGP_PACKET_LIST IMPLEMENTATION.
* rv_tag = zif_abappgp_constants=>c_tag-modification_detection.
* WHEN OTHERS.
* ASSERT 0 = 1.
* ENDCASE.
* ENDCASE

ENDMETHOD.

Expand Down
2 changes: 1 addition & 1 deletion src/zcl_abappgp_encode.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ CLASS zcl_abappgp_encode IMPLEMENTATION.
* H = Hash(M).
*
* If the hash function outputs "message too long," output "message
* too long" and stop.
* too long" and stop
lv_h = zcl_abappgp_hash=>sha256( iv_m ).

* 2. Using the list in Section 5.2.2, produce an ASN.1 DER value for
Expand Down

0 comments on commit e3405e5

Please sign in to comment.