EncryptedController is an extension of the nest.Controller class decorator
function who configures encryption password of the AES-128/256 algorithm. The
encryption algorithm and password would be used by EncryptedRoute and
EncryptedBody to encrypt the request and response body of the HTTP protocol.
By the way, you can configure the encryption password in the global level by using
EncryptedModule instead of the nest.Module in the module level. In
that case, you don't need to use this EncryptedController more. Just use the
nest.Controller without duplicated encryption password definitions.
Of course, if you want to use different encryption password from the
EncryptedModule, this EncryptedController would be useful again. Therefore,
I recommend to use this EncryptedController decorator function only when you must
configure different encryption password from the EncryptedModule.
Encrypted controller.
EncryptedController
is an extension of the nest.Controller class decorator function who configures encryption password of the AES-128/256 algorithm. The encryption algorithm and password would be used by EncryptedRoute and EncryptedBody to encrypt the request and response body of the HTTP protocol.By the way, you can configure the encryption password in the global level by using EncryptedModule instead of the nest.Module in the module level. In that case, you don't need to use this
EncryptedController
more. Just use the nest.Controller without duplicated encryption password definitions.Of course, if you want to use different encryption password from the EncryptedModule, this
EncryptedController
would be useful again. Therefore, I recommend to use thisEncryptedController
decorator function only when you must configure different encryption password from the EncryptedModule.