Sometimes it can be difficult to get things working in several development tools. For example if you encrypt something in a server shell script using openssl, you may want to decrypt in a Real Studio app. For example this command line:

openssl aes-128-cbc -in input.txt -out input_enc.txt -k mypassword -p

Runs AES 128bit CBC Mode encryption on an input.txt file. Result is written to input_enc.txt file and we use the given password. Also we didn't disable salting, so the encryption will get some salt.

So how we decrypt with MBS Plugin?
Well, we first locate the file and read it. If first 8 bytes are "Salted__", than the next 8 bytes are the salt. This is how OpenSSL adds flavor. Next we need to build key and initial vector using password, key and salt and pass them through MD5 to make them more random.

Now we can set key to AESMBS class. With passing key as string, the length of the key (16 bytes) will define that we use AES-128. We built memoryblocks for input and output and pass them Through DecryptCBC. Finally we need to remove PKCS7 padding. In result variable, we keep the result. If you encrypted text, this is the time where you can add a DefineEncoding call to mark it as UTF-8 or so.