示例#1
0
 def save_params_bio(self, bio):
     """
     Save DSA parameters to a BIO object.
 
     @type  bio: M2Crypto.BIO object
     @param bio: Save DSA parameters to this object.
     @return:    1 (true) if successful
     """
     return m2.dsa_write_params_bio(self.dsa, bio._ptr())
示例#2
0
    def save_params_bio(self, bio):
        """
        Save DSA parameters to a BIO object.

        @type  bio: M2Crypto.BIO object
        @param bio: Save DSA parameters to this object.
        @return:    1 (true) if successful
        """
        return m2.dsa_write_params_bio(self.dsa, bio._ptr())
示例#3
0
 def save_params(self, filename):
     """
     Save the DSA parameters to a file.
 
     @type  filename: str
     @param filename: Save the DSA parameters to this file.
     @return:         1 (true) if successful
     """
     bio = BIO.openfile(filename, 'wb')
     ret = m2.dsa_write_params_bio(self.dsa, bio._ptr())
     bio.close()
     return ret
示例#4
0
    def save_params(self, filename):
        """
        Save the DSA parameters to a file.

        @type  filename: str
        @param filename: Save the DSA parameters to this file.
        @return:         1 (true) if successful
        """
        bio = BIO.openfile(filename, 'wb')
        ret = m2.dsa_write_params_bio(self.dsa, bio._ptr())
        bio.close()
        return ret