Use fixed-length arrays and dedicated error types to force the callers of crate-internal crypto operations to deal with errors, usually by treating a session as corrupted (i.e. something that should not happen using only the libsignal-client APIs to manipulate sessions). This keeps from propagating context-less errors out to callers, and removes the need for error propagation altogether in some cases. It also ends up removing three specific flavors of SignalProtocolError that were already being treated as unexpected runtime exceptions.
Use fixed-length arrays and dedicated error types to force the callers of crate-internal crypto operations to deal with errors, usually by treating a session as corrupted (i.e. something that should not happen using only the libsignal-client APIs to manipulate sessions). This keeps from propagating context-less errors out to callers, and removes the need for error propagation altogether in some cases. It also ends up removing three specific flavors of SignalProtocolError that were already being treated as unexpected runtime exceptions.