Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6340191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:47:18+00:00 2026-05-24T19:47:18+00:00

I did a little testing with Blowfish encoding and noticed something. The encoded string

  • 0

I did a little testing with Blowfish encoding and noticed something. The encoded string is not always as long as the source string. it is shorter sometimes.

If i want to decode a encoded string i need the length to decode in the openssl function:

BF_cfb64_encrypt(encoded_input,decoded_output,length_to_decode,&key,iv,&num,BF_DECRYPT);    

The problem here is that i don’t have the length_to_decode if i don’t know the length of the source string. if i use the length of the decoded string as length_to_decode then this may be too short.

If i use a bigger length then the decoded string is not correct. So do i need to know the length to decode with blowfish encoding?

in all the example code on the internet encoding and decoding always takes place in one function and the decoding example use hard coded length for decoding. but in real life i don’t know the length of the encoded string and what then?

here is an example:

source string:    sdcfgssssssss
source length:    13
encryption key:   s
encrypted output: :‹(
encrypted length: 4

I init my key like this:

BF_KEY key;
const char * keyStr = "s";
BF_set_key(&key, strlen(keyStr), (const unsigned char *)keyStr);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T19:47:20+00:00Added an answer on May 24, 2026 at 7:47 pm

    The length of the output is identical to the length of the input. Do note that the output data may contain NUL characters, so you should not use strlen on the data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I did a little research and I didn't find a way, anyone know? c#
I have been noticing __construct a lot with classes. I did a little reading
Why did some processor manifacturers decide to use Little endian Big endian Middle endian
Did you ever had a bug in your code, you could not resolve? I
i've started unit testing a while ago and as turned out i did more
I did a little GP (note:very little) work in college and have been playing
I did some little experimentation on this. I created an boolean attribute, named isFault.
I did a little search on this but couldn't find anything useful. The point
I did a little experiments with Ruby class dynamic loading/unloading/updating as implementing plugins infrastructure.
Just doing a little introduction to JavaScript. I'm used to more than often testing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.