diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2021-04-18 23:26:06 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2021-04-18 23:26:06 +0200 |
| commit | 84ccd406ed7584bcedb71dca68113a58e9072f82 (patch) | |
| tree | ac4d3bcaf074d2c25beaa421b41859a815b66709 /src/IOL.VippsEcommerce/Helpers.cs | |
| parent | 1426d12bc26bdfad06d8ac8118d43c3a066e303d (diff) | |
| download | dotnet-vipps-ecommerce-84ccd406ed7584bcedb71dca68113a58e9072f82.tar.xz dotnet-vipps-ecommerce-84ccd406ed7584bcedb71dca68113a58e9072f82.zip | |
Rename VippsConfigurationKeyNames.cs internally, formatting
Diffstat (limited to 'src/IOL.VippsEcommerce/Helpers.cs')
| -rw-r--r-- | src/IOL.VippsEcommerce/Helpers.cs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/IOL.VippsEcommerce/Helpers.cs b/src/IOL.VippsEcommerce/Helpers.cs index 8d6fb50..f7645a5 100644 --- a/src/IOL.VippsEcommerce/Helpers.cs +++ b/src/IOL.VippsEcommerce/Helpers.cs @@ -16,10 +16,9 @@ namespace IOL.VippsEcommerce public static bool IsDirectoryWritable(this string dirPath, bool throwIfFails = false) { try { - using (var fs = File.Create( - Path.Combine(dirPath, Path.GetRandomFileName()), - 1, - FileOptions.DeleteOnClose) + using (var fs = File.Create(Path.Combine(dirPath, Path.GetRandomFileName()), + 1, + FileOptions.DeleteOnClose) ) { } return true; @@ -41,7 +40,7 @@ namespace IOL.VippsEcommerce using var encryptor = aes.CreateEncryptor(key, iv); var cipherText = encryptor - .TransformFinalBlock(plainText, 0, plainText.Length); + .TransformFinalBlock(plainText, 0, plainText.Length); var result = new byte[iv.Length + cipherText.Length]; iv.CopyTo(result, 0); @@ -67,7 +66,7 @@ namespace IOL.VippsEcommerce using var decryptor = aes.CreateDecryptor(key, iv); var decryptedBytes = decryptor - .TransformFinalBlock(cipherText, 0, cipherText.Length); + .TransformFinalBlock(cipherText, 0, cipherText.Length); return Encoding.UTF8.GetString(decryptedBytes); } @@ -83,4 +82,4 @@ namespace IOL.VippsEcommerce return randomBytes; } } -}
\ No newline at end of file +} |
