密码 以DER格式创建公共和私有RSA密钥 let (privateKey, publicKey) = try! CC.RSA.generateKeyPair(2048) 将它们转换为PEM格式 let privateKeyPEM = try SwKeyConvert.PrivateKey.derToPKCS1PEM(privateKey) let publicKeyPEM = SwKeyConvert.PublicKey.derToPKCS8PEM(publicKey) 或从带有PEM数据的字符串中读取它们 let privateKeyDER = SwKeyConvert.PrivateKe