FoxPro Programming
Encrypted Fields grow by...(just an fyi)
Gravatar is a globally recognized avatar based on your email address. Encrypted Fields grow by...(just an fyi)
  Albert Gostick
  All
  Feb 16, 2018 @ 01:44pm

Hi all,

Just in case someone else has to work this out, I am going to use wwEncryption to encrypt some fields and had to figure out how much this table's fields would have to be grown by for the new encrypted strings (which are longer).

I have not figured out a generalized equation for this yet but here are the results. Note that for long strings (like a file), they grow by about 33.3%. For short strings like fields, it is a pattern:

1-7 bytes --> 12 bytes 8-15 bytes --> 24 bytes 16-23 bytes --> 32 bytes 24-31 bytes --> 44 bytes 32-39 bytes --> 56 bytes 40-47 bytes --> 64 bytes 48-55 bytes --> 76 bytes 56-63 bytes --> 88 bytes 64-71 bytes --> 96 bytes and so on...(note: I did not go above 128 bytes)

Obviously the output changes every 8 bytes - but the output size "grows" by the pattern of 12, 8, 12, 12, 8, 12, 12, 8 i.e after the first 12, it is a 12, 12, 8 pattern (not going to try to code that one late on a Friday afternoon - no need as I just need to size some fields).

Albert

© 1996-2024