Exemplo n.º 1
0
Arquivo: EC.py Projeto: pmp-p/M2Crypto
    def save_pub_key_bio(self, bio):
        # type: (BIO.BIO) -> int
        """
        Save the public key to an M2Crypto.BIO.BIO object in PEM format.

        :param bio: M2Crypto.BIO.BIO object to save key to.
        """
        return m2.ec_key_write_pubkey(self.ec, bio._ptr())
Exemplo n.º 2
0
Arquivo: EC.py Projeto: mcepl/M2Crypto
    def save_pub_key_bio(self, bio):
        # type: (BIO.BIO) -> int
        """
        Save the public key to an M2Crypto.BIO.BIO object in PEM format.

        :param bio: M2Crypto.BIO.BIO object to save key to.
        """
        return m2.ec_key_write_pubkey(self.ec, bio._ptr())
Exemplo n.º 3
0
Arquivo: EC.py Projeto: pmp-p/M2Crypto
    def save_pub_key(self, file):
        # type: (AnyStr) -> int
        """
        Save the public key to a filename in PEM format.

        :param file: Name of filename to save key to.
        """
        with BIO.openfile(file, 'wb') as bio:
            return m2.ec_key_write_pubkey(self.ec, bio._ptr())
Exemplo n.º 4
0
Arquivo: EC.py Projeto: mcepl/M2Crypto
    def save_pub_key(self, file):
        # type: (AnyStr) -> int
        """
        Save the public key to a filename in PEM format.

        :param file: Name of filename to save key to.
        """
        with BIO.openfile(file, 'wb') as bio:
            return m2.ec_key_write_pubkey(self.ec, bio._ptr())
Exemplo n.º 5
0
    def save_pub_key(self, file):
        """
        Save the public key to a file in PEM format.

        @type file: string
        @param file: Name of file to save key to.
        """
        bio = BIO.openfile(file, 'wb')
        return m2.ec_key_write_pubkey(self.ec, bio._ptr())
Exemplo n.º 6
0
    def save_pub_key(self, file):
        """
        Save the public key to a file in PEM format.

        @type file: string
        @param file: Name of file to save key to.
        """
        bio = BIO.openfile(file, 'wb')
        return m2.ec_key_write_pubkey(self.ec, bio._ptr())