Hi.

base64 format can encode strings of any length. The encoded result would be longer of course.

Best regards,

Andrey Koltsov
software developer
CyberplatSoft Ltd

21.08.2012 11:45, Tarun Thakur пишет:

Hi,

Thanks for your reply..

But issue in base64 encoding is it will generate encoded test greater than
24 bytes. Application output should generate encrypted code exactly 24 bytes
as input.

Thanks,
Tarun



Andrey Koltsov-2 wrote:

Hi Tarun.

Output of every encryption function is always binary so it can contains
ANY character. You should encode this binary string to base64 or hex
format by yourself to pass it to your application. Do not forget to do
reverse encoding before decrypting.


Best regards,

Andrey Koltsov
software developer
CyberplatSoft Ltd

21.08.2012 11:16, Tarun Thakur пишет:

Hi All,

Issue is encrypted code contains '\n' which is an major issue for my
software application.

Given below is problem summarized.

I have used OpenSSL library's  DES_ede3_ofb64_encrypt() function to
perform
encryption byte by byte on chunk of 24 bytes.

For example:
Input 24 bytes are:
[root@tarun]# cat input.txt
aaaaaaaabbbbbbbbcccccccc

It encrypts 24 bytes successfully.
Generates encrypted data, for example:
[root@tarun]# cat code.txt
       RÛÄSÒ
            É#k7uÀÎCZ!°p

Here comes problem for my software application, I want all 24 encrypted
bytes in sequence WITHOUT '\n'.
If possible in printable characters.

Can you please help or guidance how to avoid '\n' in encrypted code?
Is there any range of characters I can specify to DES algorithm which can
be
used for encrypted code generation?

Please help I am stuck.

Thanks.
Tarun

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to