Unfortunately, I cannot do this. The app acquires a 16 byte hex string from a security controller and passes this string onto the Rijndael encryption function. The encryption function will always generate the same binary encrypted values. I'm using the Electronic Code Book Rijndael method that is required by the controller which as indicated above always generates the same encrypted values. I do have a temporary solution that requires the end user to change the hex value on the controller that generates the 0x00 to some other value. But this is a major inconvenience to the end user.
Can you check the string and generate a new one if it contains nulls?
I'm currently using the REG_BINARY type for the key. I'm not aware of any other registry type that would allow a null value, 0x00 in particular and binary data in general.
Can you store the data in another format that allows nulls?
I can store the length of the string in another key. But how would I use the registry API to read past the 0x00 value? RegQueryValueEx stops reading at the 0x00 value.
Can you store the length or the string so you know how much to read?
I'm currently working on moving this data out of the registry and into a Sqllite3 database. Sqllite3 has an "extension" for lack of a better description to store BLOB data in a field.
Can you store the info somewhere else (windows ini file)?
I'm not aware of any other API to read/write the registry.
Can you use a diff API call that will not present this error?