perl CBC DES equivalent in java
问题 We are migrating some code from perl to java/scala and we hit a roadblock. We're trying to figure out how to do this in Java/scala: use Crypt::CBC; $aesKey = "some key" $cipher = new Crypt::CBC($aesKey, "DES"); $encrypted = $cipher->encrypt("hello world"); print $encrypted // prints: Salted__�,%�8XL�/1�&�n;����쀍c $decrypted = $cipher->decrypt($encrypted); print $decrypted // prints: hello world I tried a few things in scala but didn't really get it right, for example something like this: val