Posted to tcl by rhobart at Thu Dec 03 21:53:35 GMT 2026view raw

  1. #.........
  2. set rowsJSON [::json::dict2json $rowsDict]
  3. #return "$rowsDict"
  4.  
  5. #encrypt
  6. if { [llength $listOrders] > 1 } {
  7. set iv [genIv]
  8. set iv64 [base64::encode $iv]
  9. set dataUTF [encoding convertto utf-8 $rowsJSON]
  10. set data [pkcs7_pad $rowsJSON 16]
  11. set encryptdata [aes::aes -mode cbc -dir encrypt -key $key -iv $iv $data]
  12. set ivAndEncryptdata "${iv}${encryptdata}"
  13. set ivAndEncryptdata64 [base64::encode $ivAndEncryptdata]
  14.  
  15. return ${ivAndEncryptdata64}
  16. }

Add a comment

Please note that this site uses the meta tags nofollow,noindex for all pages that contain comments.
Items are closed for new comments after 1 week