Posted to tcl by rhobart at Thu Aug 28 16:58:43 GMT 2025view raw

  1. set keybase64 "5PsuDIkvDUcI/z84TOdX3ulp/ePeYHklciGHnB33apo=" ; # from java secretkey
  2. set keyj [base64::decode $keybase64]
  3. puts "keyj length [string length $keyj]"
  4.  
  5. set data64 "+PE2fqjbnXgFDgaxiiU6uA==" ; # encrypted by java secretkey
  6. set datad [base64::decode $data64]
  7.  
  8. # method1
  9. set decryptdata [aes::aes -mode cbc -dir decrypt -key $keyj -iv $iv $datad]
  10. puts "decrypteddata: $decryptdata"
  11.  
  12. # method2
  13. set keytcl [aes::Init cbc $keyj $iv]
  14. set msg [aes::Decrypt $keytcl $datad]
  15. aes::Final $keytcl
  16. puts "msg: $msg"

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