def dec(self, byts):
        '''
        Decode an envelope dict and decrypt the given bytes.

        Args:
            byts (bytes): Bytes to decrypt.

        Returns:
            bytes: Decrypted message.
        '''
        envl = s_msgpack.un(byts)
        iv = envl.get('iv', b'')
        asscd = envl.get('asscd', b'')
        data = envl.get('data', b'')

        decryptor = AESGCM(self.ekey)

        try:
            data = decryptor.decrypt(iv, data, asscd)
        except Exception:
            logger.exception('Error decrypting data')
            return None
        return data
def dec ( self , byts ) : envl = s_msgpack . un ( byts ) iv = envl . get ( 'iv' , b'' ) asscd = envl . get ( 'asscd' , b'' ) data = envl . get ( 'data' , b'' ) decryptor = AESGCM ( self . ekey ) try : data = decryptor . decrypt ( iv , data , asscd ) except Exception : logger . exception ( 'Error decrypting data' ) return None return data
Decode an envelope dict and decrypt the given bytes.

        Args:
            byts (bytes): Bytes to decrypt.

        Returns:
            bytes: Decrypted message.