示例#1
0
文件: fko.py 项目: PHPDOTSQL/fwknop
    def spa_data_final(self, key, hmac_key):
        """Perform final processing and generation of the SPA message data.

        This function is the final step in creating a complete encrypted
        SPA data string suitable for transmission to an fwknop server.  It
        does require all of the requisite SPA data fields be set. Otherwise,
        it will fail and throw an fko.error exception.
        """
        _fko.spa_data_final(self.ctx, key, hmac_key)
示例#2
0
    def spa_data_final(self, key, hmac_key):
        """Perform final processing and generation of the SPA message data.

        This function is the final step in creating a complete encrypted
        SPA data string suitable for transmission to an fwknop server.  It
        does require all of the requisite SPA data fields be set. Otherwise,
        it will fail and throw an fko.error exception.
        """
        _fko.spa_data_final(self.ctx, key, hmac_key)
示例#3
0
文件: fko.py 项目: PKRoma/fwknop
    def spa_data_final(self, key, hmac_key):
        """Perform final processing and generation of the SPA message data.

        This function is the final step in creating a complete encrypted
        SPA data string suitable for transmission to an fwknop server.  It
        does require all of the requisite SPA data fields be set. Otherwise,
        it will fail and throw an fko.error exception. We do set the default
        HMAC digest to SHA256 if an HMAC key was provided and the HMAC mode
        was not already set.
        """
        if hmac_key and not _fko.get_spa_hmac_type(self.ctx):
            _fko.set_spa_hmac_type(self.ctx, FKO_HMAC_SHA256)

        _fko.spa_data_final(self.ctx, key, hmac_key)
示例#4
0
文件: fko.py 项目: zhuyue1314/fwknop
    def spa_data_final(self, key, hmac_key):
        """Perform final processing and generation of the SPA message data.

        This function is the final step in creating a complete encrypted
        SPA data string suitable for transmission to an fwknop server.  It
        does require all of the requisite SPA data fields be set. Otherwise,
        it will fail and throw an fko.error exception. We do set the default
        HMAC digest to SHA256 if an HMAC key was provided and the HMAC mode
        was not already set.
        """
        if hmac_key and not _fko.get_spa_hmac_type(self.ctx):
            _fko.set_spa_hmac_type(self.ctx, FKO_HMAC_SHA256)

        _fko.spa_data_final(self.ctx, key, hmac_key)
示例#5
0
文件: fko.py 项目: PHPDOTSQL/fwknop
 def gen_spa_data(self, key):
     """Alias for "spa_data_final()".
     """
     _fko.spa_data_final(self.ctx, key)
示例#6
0
 def gen_spa_data(self, key):
     """Alias for "spa_data_final()".
     """
     _fko.spa_data_final(self.ctx, key)