Skip to content

Commit cab2555

Browse files
committed
fix(加密): 将异常消息中的字符串改为逐字字符串
统一异常消息字符串格式,使用逐字字符串(@)以避免转义字符问题
1 parent e892993 commit cab2555

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

GameFrameX.Foundation.Encryption/AesHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static byte[] Encrypt(byte[] encryptByte, string encryptKey)
5656
{
5757
if (encryptByte == null)
5858
{
59-
throw new ArgumentNullException(nameof(encryptByte), "Plain text byte array cannot be null");
59+
throw new ArgumentNullException(nameof(encryptByte), @"Plain text byte array cannot be null");
6060
}
6161

6262
if (encryptByte.Length == 0)
@@ -149,7 +149,7 @@ public static byte[] AesDecrypt(byte[] decryptByte, string decryptKey)
149149
{
150150
if (decryptByte == null)
151151
{
152-
throw new ArgumentNullException(nameof(decryptByte), "Cipher text byte array cannot be null");
152+
throw new ArgumentNullException(nameof(decryptByte), @"Cipher text byte array cannot be null");
153153
}
154154

155155
if (decryptByte.Length == 0)

0 commit comments

Comments
 (0)