services:

    Nzo\UrlEncryptorBundle\Encryptor\Encryptor: "@nzo_encryptor"

    nzo_encryptor:
        class: Nzo\UrlEncryptorBundle\Encryptor\Encryptor
        arguments:
            - "%nzo_encryptor.secret_key%"
            - "%nzo_encryptor.cipher_algorithm%"
            - "%nzo_encryptor.base64_encode%"
            - "%nzo_encryptor.format_base64_output%"
            - "%nzo_encryptor.random_pseudo_bytes%"
        calls:
            - [setSecretIv, ["%nzo_encryptor.secret_iv%"]]

    nzo.twig.encryptor_extension:
        class: Nzo\UrlEncryptorBundle\Twig\EncryptorExtension
        arguments:
            - "@nzo_encryptor"
        tags:
            - { name: twig.extension }

    nzo.annotation_resolver:
        class: Nzo\UrlEncryptorBundle\Annotations\AnnotationResolver
        arguments:
            - "@annotations.reader"
            - "@nzo_encryptor"
        tags:
            - { name: kernel.event_listener, event: kernel.controller, method: onKernelController }
