Posted to tcl by rhobart at Thu Aug 28 16:59:17 GMT 2025view raw
- set keybase64 "5PsuDIkvDUcI/z84TOdX3ulp/ePeYHklciGHnB33apo=" ; # from java secretkey
- set keyj [base64::decode $keybase64]
- puts "keyj length [string length $keyj]"
- set data64 "+PE2fqjbnXgFDgaxiiU6uA==" ; # encrypted by java secretkey
- set datad [base64::decode $data64]
- # method1
- set decryptdata [aes::aes -mode cbc -dir decrypt -key $keyj -iv $iv $datad]
- puts "decrypteddata: $decryptdata"
- # method2
- set keytcl [aes::Init cbc $keyj $iv]
- set msg [aes::Decrypt $keytcl $datad]
- aes::Final $keytcl
- puts "msg: $msg"
Add a comment