diff --git a/LibGit2Sharp/CertificateSsh.cs b/LibGit2Sharp/CertificateSsh.cs
index 3c66bd995..d72b69469 100644
--- a/LibGit2Sharp/CertificateSsh.cs
+++ b/LibGit2Sharp/CertificateSsh.cs
@@ -35,10 +35,6 @@ protected CertificateSsh()
///
public readonly bool HasSHA1;
- ///
- /// True if we have the SHA1 hostkey hash from the server
- /// public readonly bool HasSHA1;
-
internal unsafe CertificateSsh(git_certificate_ssh* cert)
{
@@ -46,21 +42,15 @@ internal unsafe CertificateSsh(git_certificate_ssh* cert)
HasSHA1 = cert->type.HasFlag(GitCertificateSshType.SHA1);
HashMD5 = new byte[16];
- fixed (byte* p = &HashMD5[0])
+ for (var i = 0; i < HashMD5.Length; i++)
{
- for (var i = 0; i < HashMD5.Length; i++)
- {
- HashMD5[i] = p[i];
- }
+ HashMD5[i] = cert->HashMD5[i];
}
HashSHA1 = new byte[20];
- fixed (byte* p = &HashSHA1[0])
+ for (var i = 0; i < HashSHA1.Length; i++)
{
- for (var i = 0; i < HashSHA1.Length; i++)
- {
- HashSHA1[i] = p[i];
- }
+ HashSHA1[i] = cert->HashSHA1[i];
}
}
diff --git a/LibGit2Sharp/Core/GitCertificateSsh.cs b/LibGit2Sharp/Core/GitCertificateSsh.cs
index b1b9d7940..e3e7c4927 100644
--- a/LibGit2Sharp/Core/GitCertificateSsh.cs
+++ b/LibGit2Sharp/Core/GitCertificateSsh.cs
@@ -14,7 +14,7 @@ internal unsafe struct git_certificate_ssh
public unsafe fixed byte HashMD5[16];
///
- /// The MD5 hash (if appropriate)
+ /// The SHA1 hash (if appropriate)
///
public unsafe fixed byte HashSHA1[20];
}