encrypted-session-nginx-module
                                
                                 encrypted-session-nginx-module copied to clipboard
                                
                                    encrypted-session-nginx-module copied to clipboard
                            
                            
                            
                        explicit specification of encryption in each request
I need to make two separate session encryptions within the same location and they shouldn't share the same key. I tried in vain to add encryption key as an optional additional parameter to set_encrypt_session or set_decrypt_session but got stuck when I couldn't tell whether the optional parameter was specified.
As an alternative I added two new directives:
set_encrypt_session_keyed $target <value> <key>
set_decrypt_session_keyed $target <value> <key>