Projet

Général

Profil

« Précédent | Suivant » 

Révision 83c9a56a

Ajouté par Frédéric Péters il y a presque 4 ans

adapt bits for py3 (#19613)

Voir les différences:

mandayejs/mandaye/models.py
22 22
from django.db import models
23 23
from django.conf import settings
24 24
from django.utils.translation import ugettext_lazy as _
25
from django.utils.encoding import force_bytes
25 26

  
26 27
from jsonfield import JSONField
27 28

  
......
48 49
    def _get_cipher(self, iv):
49 50
        """Return cipher object
50 51
        """
51
        secret = sha256(settings.SECRET_KEY).digest()
52
        secret = sha256(force_bytes(settings.SECRET_KEY)).digest()
52 53
        return AES.new(secret, AES.MODE_CFB, iv)
53 54

  
54 55
    def encrypt(self,):

Formats disponibles : Unified diff