We have to ensure that the header size written by keyring key encryption doesn't cross the encryption header size used by Master Key encryption. Once the header size is crossed, it will corrupt the data written for other features.
Size of MK encryption header size: ENCRYPTION_INFO_MAX_SIZE ( 115 bytes)
Size of Keyring encryption header size: fil_get_encrypt_info_size(16) = 105.0
The aim of this improvement is to add safeguard checks (release build asserts) that can detect corruption of headers when keyring header size crosses 115 bytes.