如何在文本文件连接字符串中加密和解密密码

编程入门 行业动态 更新时间:2024-10-27 00:35:05
本文介绍了如何在文本文件连接字符串中加密和解密密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

显示错误: Base-64字符串中的字符无效。 如何获得pass,ds,db当写文字Textfile时,uid值。请帮助我 这个我的代码

展开 | 选择 | Wrap | 行号

解决方案

第22行需要在第23行内。 您还需要确保加密方法返回base64格式的字符串,因为它看起来像解密方法需要base64输入。如果没有,你需要先加密输出并将其格式化为base64。 但我不知道你是如何加密它而不提供密码的。

这是我的问题我不知道如何加密提供密码。请给我答案

嘿mohammed saleh,保护你的连接字符串,将你的连接字符串存储在app.config / web.config文件中(取决于你的项目)然后加密/解密它使用 ProtectedConfigurationProvider 。有关详细信息,请参阅以下链接。 保护连接字符串

Show Error : Invalid character in a Base-64 string. How Can I get pass,ds,db,uid the value when writeline Textfile.Please help me this my code

Expand|Select|Wrap|Line Numbers

解决方案

Line 22 needs to be inside line 23. You also need to make sure that the encryption method returns a base64 formatted string because it looks like the decryption method expects a base64 input. If not, you will need to take the encryption output and format it to base64 first. But I don''t understand how you are encrypting it without supplying a password.

This my problem " I don''t know how encrypting it supplying a password." please give me the answer

Hey mohammed saleh, to protect your connection string, store your connection string in app.config/web.config file (depending on your project) then encrypt/decrypt it using "ProtectedConfigurationProvider". Refer the following link for more information. Securing Connection Strings

更多推荐

如何在文本文件连接字符串中加密和解密密码

本文发布于:2023-11-07 01:14:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1565151.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字符串   文本文件   密码   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!