yeepay_yop_parse_certificates
Extract Base64-encoded public or private keys from certificate files (.pfx or .cer) using specified algorithms (RSA or SM2). Supports optional password input for .pfx files and returns parsed results in a structured dictionary format.
Instructions
根据证书文件解析出Base64编码后的公钥或私钥字符串
Args: algorithm (str): 密钥算法,可选值为 "RSA" 或 "SM2",默认为 "RSA" pfx_cert (str): 私钥证书(.pfx)文件路径 pub_cert (str): 公钥证书(.cer)文件路径 pwd (str, optional): PFX证书的密码,默认为None
Returns: dict: 包含解析结果的字典,格式如下: { 'message': 响应信息, 'privateKey': Base64编码后的私钥字符串, 'publicKey': Base64编码后的公钥字符串 }
Input Schema
Name | Required | Description | Default |
---|---|---|---|
algorithm | No | RSA | |
pfx_cert | No | ||
pub_cert | No | ||
pwd | No |