Don't validate sizes ahead of time if the subclass calls CheckValidContents anyway. (Now that these classes aren't code-gen'd, keeping sizes in sync is a pain.)
Move serialize() up to ByteArray. Consequently, make ProfileKeyVersion not a ByteArray, since it serializes as a string.
serialize()
up to ByteArray. Consequently, make ProfileKeyVersion not a ByteArray, since it serializes as a string.