Optionalvalidator: IRequestBodyValidator<T>Parameter decorator
contracts/common.md#principled-implementation The body must be text/plain ciphertext; it is decrypted with the password of the controller or module, the plain text is parsed as JSON and validated by the transformed validator, and a decryption or parse failure becomes a 400 with one fixed message that does not echo the ciphertext and does not tell the two failures apart; a key or initialization vector the cipher itself refuses is the server's configuration, independent of the request, and is thrown as it is.
contracts/common.md#clear-and-simple-design One parameter decorator composes shared text reading, password lookup and validator resolution; the successfully resolved data becomes the argument without repeating validation or changing decryption error handling.
contracts/common.md#prohibited-implementation-shortcuts The algorithm comes from AesPkcs5 of the fetcher, the same one the client uses, and no key is embedded; a missing password is an error rather than a plain pass-through.
Encrypted body decorator.
EncryptedBodyis a decorator function gettingapplication/jsontyped data from request body which has been encrypted by AES-128/192/256 algorithm. Also,EncryptedBodyvalidates the request body data type through typia using the declared TypeScript type.For reference, when the request body data is not following the promised type
T,BadRequestExceptionerror (status code: 400) would be thrown. Also, This decorator decrypts the request body using these options.Successful validator data becomes the decorated argument, including copies returned by clone validators after decryption and JSON parsing.