1.VB å å¯ä¸è§£å¯çç¨åºä»£ç
2.vbå¦ä½ç¨unicodeç¼ç å®ç°MD5å å¯
3.vb 请问怎么将写入.txt文件的加密加密普元开发框架源码内容加密
VB å å¯ä¸è§£å¯çç¨åºä»£ç
å å¯ï¼Private Function JiaMi(ByVal varPass As String) As String 'åæ°varPassæ¯éè¦å å¯çææ¬å 容
Dim varJiaMi As String *
Dim varTmp As Double
Dim strJiaMi As String
Dim I
For I = 1 To Len(varPass)
varTmp = AscW(Mid$(varPass, I, 1))
varJiaMi = Str$(((((varTmp * 1.5) / 5.6) * 2.7) * I))
strJiaMi = strJiaMi & varJiaMi
Next I
JiaMi = strJiaMi
End Function
解å¯å½æ°ï¼
Private Function JieMi(ByVal varPass As String) As String 'åæ°varPassæ¯éè¦è§£å¯çå¯æå 容
Dim varReturn As String *
Dim varConvert As Double
Dim varFinalPass As String
Dim varKey As Integer
Dim varPasslenth As Long
varPasslenth = Len(varPass)
For I = 1 To varPasslenth /
varReturn = Mid(varPass, (I - 1) * + 1, )
varConvert = Val(Trim(varReturn))
varConvert = ((((varConvert / 1.5) * 5.6) / 2.7) / I)
varFinalPass = varFinalPass & ChrW(Val(varConvert))
Next I
JieMi = varFinalPass
End Function
æ©å±èµæï¼æ³¨æäºé¡¹
ç¼åå å¯ç¨åºï¼å°ç¨æ·è¾å ¥çä¸ä¸ªè±æå¥åå å¯ä¸ºå å¯å符串ï¼ç¶åè¾åºå å¯å符串ãå设å¥åé¿åº¦ä¸è¶ è¿ä¸ªå符ã
æ ¹æ®ç»å®çå¥åå å¯å½æ°ååSentenceEncodingï¼ç¼åå½æ°SentenceEncodingè°ç¨ç»å®çå符å å¯å½æ°CharEncodingå®æå¥åå å¯ã
ç¶åï¼ç¼å主ç¨åºæ示ç¨æ·è¾å ¥è±æå¥åï¼ç¶åè°ç¨å½æ°SentenceEncoding对å¥åå å¯ï¼æåè¾åºå å¯åçå¥åã
å符å å¯è§å为大ååæ¯åå°ååæ¯åå å¯ä¸ºå ¶è¡¥ç , æ们å®ä¹ASCIIç å¼ç¸å 为âAâ+âZâå³ç两个大ååæ¯äºä¸ºè¡¥ç ï¼ASCIIç å¼ç¸å 为âaâ+âzâå³ç两个å°ååæ¯äºä¸ºè¡¥ç ã
ç©ºæ ¼ç¨@代æ¿,å¥å·ä»¥#代æ¿,å ¶å®å符ç¨å¥ç¹ä»£æ¿ã
å½æ°ååï¼
void SentenceEncoding(char *soure,char *code);
åè½ï¼å¯¹å¾ å å¯å符串sourceå å¯åä¿åå å¯å符串å°code.
åæ°ï¼char *soureï¼æåå¾ å å¯å¥åçå符串æéï¼
char *code æåå å¯å符串çå符串æéï¼
å符å å¯å½æ°ä»£ç ã
vbå¦ä½ç¨unicodeç¼ç å®ç°MD5å å¯
''' <summary>çæä½å å¯å符串</summary>
''' <param name="strSource">éè¦å å¯çå符串</param>
''' <returns>å å¯å®æçä½å符串</returns>
''' <remarks></remarks>
Friend Function creatMD5(ByRef strSource As String)
Dim dataToHash As Byte() = (New System.Text.UnicodeEncoding).GetBytes(strSource.ToCharArray)
Dim hashvalue As Byte() = CType(Cryptography.CryptoConfig.CreateFromName("MD5"), Cryptography.HashAlgorithm).ComputeHash(dataToHash)
Dim strSB As New System.Text.StringBuilder
For i = 0 To hashvalue.Length - 1
strSB.Append(hashvalue(i).ToString("x2"))
Next
creatMD5 = strSB.ToString
Return creatMD5
End Function
è°ç¨ ï¼creatMD5("md5")
å¾å° ï¼dadbcdaead7eab
å¦æä¸å®è¦å¤§åï¼æ¹ä¸ä¸ï¼creatMD5 = strSB.ToString.ToUpper
vb 请问怎么将写入.txt文件的内容加密
简单点加密就用 异或Dim b() As Byte, i As Longb = StrConv("test", vbFromUnicode)
For i = 0 To UBound(b)
b(i) = b(i) Xor
Next
将数组b内容保存到文本
同样的代码 解密
2025-01-04 05:181062人浏览
2025-01-04 04:192344人浏览
2025-01-04 03:58294人浏览
2025-01-04 03:281980人浏览
2025-01-04 03:07352人浏览
2025-01-04 03:051282人浏览
據新華社報道,法國總統馬克龍22日視察巴黎奧運會奧運村時,呼籲在奧運會舉辦期間實現全球休戰。馬克龍當天上午視察了位於巴黎北郊聖但尼市的奧運村,他在接受媒體採訪時表示,即將開幕的巴黎奧運會將成為法國國家
1.vue框架集成cesium“黑科技”2.什么是苹果源码3.深入探索Redis的IO多线程:解密并发读写的黑科技4.源码剖析狗屁不通文章生成器5.迷你世界弄黑科技的是什么软件?6.游戏引擎随笔 0x
中国消费者报成都讯记者刘铭)6月13日,四川省成都市市场监管局、成都市消委会发布消费提示,希望消费者用“一看二问三算”的办法识别茶叶过度包装,抵制过度包装,倡导绿色消费,同时,鼓励茶企进一步研发新型材