Breaking changes from the .NET Framework 4.5.1 / Visual Studio 2013 package:
- Target framework. The library is now .NET Standard 2.0 (SDK-style project). It no longer targets .NET Framework 4.5.1 only.
- Encrypt / Decrypt. Windows RSA key-container crypto (
CspParameters/RSACryptoServiceProvider) is replaced with AES-256-CBC, HMAC-SHA256 integrity, and PBKDF2-HMAC-SHA256 (100,000 iterations) for key derivation. Ciphertext is a hyphen-separated hex payload: salt + IV + ciphertext + tag. Payloads produced by 1.x cannot be decrypted. Wrong passphrase or a tampered payload throwsCryptographicException. - CreateParameters removed. The SQL-concatenation helper is gone. Use parameterized queries.
- IsValidIPv4. Uses
IPAddress.TryParseand requires a canonical dotted-quad (AddressFamily.InterNetwork). Scheme-prefixed strings, IPv6, and non-canonical forms such as127.00.0.1are rejected. - JsonToObject. Throws
InvalidOperationExceptionwhen JSON deserializes to null instead of returningdefault(T). - ReplaceLineFeeds. Removes CR/LF sequences only. It no longer strips
.characters (the previous regex matched a literal period). - QueryStringToDictionary. Reads the query after the first
?, strips a#fragment, URL-decodes keys and values (Uri.UnescapeDataString;+is a space), and last-wins on duplicate keys.
Other notable changes:
- Hash helpers (
CreateHashSha256,CreateHashSha512) andGetLengthare extension methods (this). - Several P0 contract fixes:
IsLengthhonors the maximum bound;RemoveSuffixreturns the original string when the suffix is missing;CountOccurrencestreats the needle as a literal;Capitalize/IsEmailAddressare null-safe.