示例#1
0
文件: key.py 项目: sfluo/Mr.Bot
    def _save_pkcs1_pem(self):
        '''Saves a PKCS#1 PEM-encoded private key file.

        @return: contents of a PEM-encoded file that contains the private key.
        '''

        der = self._save_pkcs1_der()
        return pem.save_pem(der, b('RSA PRIVATE KEY'))
示例#2
0
    def _save_pkcs1_pem(self):
        '''Saves a PKCS#1 PEM-encoded private key file.

        @return: contents of a PEM-encoded file that contains the private key.
        '''

        der = self._save_pkcs1_der()
        return pem.save_pem(der, b('RSA PRIVATE KEY'))
示例#3
0
文件: key.py 项目: sfluo/Mr.Bot
    def _save_pkcs1_pem(self):
        '''Saves a PKCS#1 PEM-encoded public key file.

        @return: contents of a PEM-encoded file that contains the public key.
        '''

        der = self._save_pkcs1_der()
        return pem.save_pem(der, 'RSA PUBLIC KEY')
示例#4
0
    def _save_pkcs1_pem(self):
        '''Saves a PKCS#1 PEM-encoded public key file.

        @return: contents of a PEM-encoded file that contains the public key.
        '''

        der = self._save_pkcs1_der()
        return pem.save_pem(der, 'RSA PUBLIC KEY')