Posted to tcl by Bradipo at Wed Aug 27 20:55:36 GMT 2025view raw

  1. % package require aes
  2. 1.2.2
  3. % package require base64
  4. 2.6.1
  5.  
  6. % set iv [binary decode hex 30313233343536373839616263646566]
  7. 0123456789abcdef
  8. % set key [binary decode hex 7468697372616e646f6d706f70706c6534393121403f79307963787662757265]
  9. thisrandompopple491!@?y0ycxvbure
  10.  
  11. % set data "Encrypted in Tcl!"
  12. Encrypted in Tcl!
  13. % base64::encode [aes::aes -dir encrypt -key $key -iv $iv $data]
  14. akLHodgYT0CJEnfuTEJA5d280uAKuuKUTeIn7OaylTk=
  15.  
  16. Now, decrypt in OpenSSL:
  17.  
  18. $ echo akLHodgYT0CJEnfuTEJA5d280uAKuuKUTeIn7OaylTk= | openssl enc -aes-256-cbc -a -d -iv 30313233343536373839616263646566 -K 7468697372616e646f6d706f70706c6534393121403f79307963787662757265 -nopad
  19. Encrypted in Tcl!

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