@@ -60,31 +60,32 @@ public string AesEncryptByteToString(byte[] data, byte[] secretKey, byte[] iv)
6060 return cipherText . BytesToString ( ) ;
6161 }
6262
63+ // needs methods that would accept aes mode
64+ //public byte[] AesEncrypt(byte[] data, byte[] key, byte[] iv, ReturnType returnType)
65+ //{
66+
67+ //}
68+
6369 private void NullChecks ( string data , string secretKey , string iv )
6470 {
6571 if ( data == null || data . Length <= 0 )
66- throw new ArgumentNullException ( "plainText" ) ;
72+ throw new ArgumentNullException ( nameof ( data ) ) ;
6773
6874 if ( secretKey == null || secretKey . Length <= 0 )
69- throw new ArgumentNullException ( "Key" ) ;
75+ throw new ArgumentNullException ( nameof ( secretKey ) ) ;
7076
7177 if ( iv == null || iv . Length <= 0 )
72- throw new ArgumentNullException ( "IV" ) ;
78+ throw new ArgumentNullException ( nameof ( iv ) ) ;
7379 }
7480
7581 private void NullChecks ( string data , string secretKey )
7682 {
7783 if ( data == null || data . Length <= 0 )
78- throw new ArgumentNullException ( "plainText" ) ;
84+ throw new ArgumentNullException ( nameof ( data ) ) ;
7985
8086 if ( secretKey == null || secretKey . Length <= 0 )
81- throw new ArgumentNullException ( "Key" ) ;
82- }
83-
84- //public byte[] AesEncrypt(byte[] data, byte[] key, byte[] iv, ReturnType returnType)
85- //{
86-
87- //}
87+ throw new ArgumentNullException ( nameof ( secretKey ) ) ;
88+ }
8889 }
8990
9091 public class AesData
0 commit comments