Refactor string handling in encrypt-then-authenticate.
Refactor string handling in encrypt-then-authenticate.

Replaces the append() calls with a single absl::StrCat for constructing authentication data. Carry out the sanity check for AAD earlier in order to save operations when the input is invalid.

PiperOrigin-RevId: 347339067

google/tink,google/tink,google/tink,google/tink,google/tink,google/tink,google/tink,google/tink