wasSharpNET – Diff between revs 1 and 3
?pathlinks?
Rev 1 | Rev 3 | |||
---|---|---|---|---|
Line 7... | Line 7... | |||
7 | using System; |
7 | using System; |
|
8 | using System.Collections.Generic; |
8 | using System.Collections.Generic; |
|
9 | using System.IO; |
9 | using System.IO; |
|
10 | using System.Linq; |
10 | using System.Linq; |
|
11 | using System.Security.Cryptography; |
11 | using System.Security.Cryptography; |
|
12 | using System.Text; |
- | ||
Line 13... | Line 12... | |||
13 | |
12 | |
|
14 | namespace wasSharpNET.Cryptography |
13 | namespace wasSharpNET.Cryptography |
|
15 | { |
14 | { |
|
16 | public class AES |
15 | public class AES |
|
17 | { |
- | ||
18 | private static readonly RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); |
16 | { |
|
19 | private const int AES_BLOCK_SIZE = 128; |
17 | private const int AES_BLOCK_SIZE = 128; |
|
20 | private const CipherMode AES_CIPHER_MODE = CipherMode.CBC; |
18 | private const CipherMode AES_CIPHER_MODE = CipherMode.CBC; |
|
21 | private const PaddingMode AES_PADDING_MODE = PaddingMode.PKCS7; |
19 | private const PaddingMode AES_PADDING_MODE = PaddingMode.PKCS7; |
|
- | 20 | private const int AES_KEY_SALT_BYTES = 16; |
||
Line 22... | Line 21... | |||
22 | private const int AES_KEY_SALT_BYTES = 16; |
21 | private static readonly RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); |
|
23 | |
22 | |
|
24 | /////////////////////////////////////////////////////////////////////////// |
23 | /////////////////////////////////////////////////////////////////////////// |
|
25 | // Copyright (C) Wizardry and Steamworks 2016 - License: GNU GPLv3 // |
24 | // Copyright (C) Wizardry and Steamworks 2016 - License: GNU GPLv3 // |