public function getEncryptionEnabledEntitiesMetadata()
    {
        $entityManager = $this->doctrine->getManager();
        $doctrineMetadataFactory = $entityManager->getMetadataFactory();

        $encryptedEnabledTypes = array();
        $encryptionMetadata = $this->metadataFactory->getAllMetadata();
        /** @var ClassMetadata $encryptionClassMetadata */
        foreach ($encryptionMetadata as $encryptionClassMetadata) {
            if ($encryptionClassMetadata->encryptionEnabled) {
                $className = $encryptionClassMetadata->name;
                $encryptedEnabledTypes[] = $doctrineMetadataFactory->getMetadataFor($className);
            }
        }

        return $encryptedEnabledTypes;
    }