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

  • Home
  • SEARCH
  • 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 38621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:44:12+00:00 2026-05-10T14:44:12+00:00

We have a situation in our product where for a long time some data

  • 0

We have a situation in our product where for a long time some data has been stored in the application’s database as SQL string (choice of MS SQL server or sybase SQL anywhere) which was encrypted via the Windows API function CryptEncrypt. (direct and de-cryptable)

The problem is that CryptEncrypt can produce NULL’s in the output, meaning that when it’s stored in the database, the string manipulations will at some point truncate the CipherText.

Ideally we’d like to use an algo that will produce CipherText that doesn’t contain NULLs as that will cause the least amount of change to the existing databases (changing a column from string to binary and code to deal with binary instead of strings) and just decrypt existing data and re-encrypt with the new algorithm at database upgrade time.

The algorithm doesn’t need to be the most secure, as the database is already in a reasonably secure environment (not an open network / the inter-webs) but does need to be better than ROT13 (which I can almost decrypt in my head now!)

edit: btw, any particular reason for changing ciphertext to cyphertext? ciphertext seems more widely used…

  • 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. 2026-05-10T14:44:13+00:00Added an answer on May 10, 2026 at 2:44 pm

    Any semi-decent algorithm will end up with a strong chance of generating a NULL value somewhere in the resulting ciphertext.

    Why not do something like base-64 encode your resulting binary blob before persisting to the DB? (sample implementation in C++).

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

Sidebar

Related Questions

We have a situation where our application calls some stored procedures on a sql
I have a situation where our developers extended a Third party database (MS SQL)
We've encountered the following situation in our database. We have table 'A' and table
Situation: We have several small icons on our Magento Product page. After clicking one,
We have a situation in which our web application calls our webservice, which than
I have situation in which I read a record from a database. And if
I have situation where a user can manipulate a large set of data (presented
Pseudo-situation: have a class (let's say BackgroundMagic ), and it has Start() and Stop()
I have a website where everytime one of our customers reviews a new product
We have a product that we need to create an installer for. It has

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.