diff --git a/MBS.Framework/MBS.Framework.csproj b/MBS.Framework/MBS.Framework.csproj
index 4cb50ff..da6beef 100644
--- a/MBS.Framework/MBS.Framework.csproj
+++ b/MBS.Framework/MBS.Framework.csproj
@@ -11,6 +11,7 @@
2.0
true
..\..\MichaelBecker.snk
+ 4.0.2019.12
true
@@ -48,6 +49,7 @@
+
diff --git a/MBS.Framework/Security/Cryptography/ExtensionMethods.cs b/MBS.Framework/Security/Cryptography/ExtensionMethods.cs
new file mode 100644
index 0000000..a1c4593
--- /dev/null
+++ b/MBS.Framework/Security/Cryptography/ExtensionMethods.cs
@@ -0,0 +1,27 @@
+using System.Security.Cryptography;
+
+namespace MBS.Framework.Security.Cryptography
+{
+ public static class ExtensionMethods
+ {
+ ///
+ /// Computes the hash of the specified value in the given encoding.
+ ///
+ /// The hash.
+ /// Value.
+ public static string ComputeHash(this HashAlgorithm ha, string value, System.Text.Encoding encoding = null)
+ {
+ if (encoding == null) encoding = System.Text.Encoding.UTF8;
+
+ byte[] buffer = encoding.GetBytes(value);
+
+ System.Text.StringBuilder sb = new System.Text.StringBuilder();
+ byte[] output = ha.ComputeHash(buffer);
+ for (int i = 0; i < output.Length; i++)
+ {
+ sb.Append(output[i].ToString("x").PadLeft(2, '0'));
+ }
+ return sb.ToString();
+ }
+ }
+}