File tree 2 files changed +5
-15
lines changed 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -35,32 +35,22 @@ protected CertificateSsh()
35
35
/// </summary>
36
36
public readonly bool HasSHA1 ;
37
37
38
- /// <summary>
39
- /// True if we have the SHA1 hostkey hash from the server
40
- /// </summary>public readonly bool HasSHA1;
41
-
42
38
internal unsafe CertificateSsh ( git_certificate_ssh * cert )
43
39
{
44
40
45
41
HasMD5 = cert ->type . HasFlag ( GitCertificateSshType . MD5 ) ;
46
42
HasSHA1 = cert ->type . HasFlag ( GitCertificateSshType . SHA1 ) ;
47
43
48
44
HashMD5 = new byte [ 16 ] ;
49
- fixed ( byte * p = & HashMD5 [ 0 ] )
45
+ for ( var i = 0 ; i < HashMD5 . Length ; i ++ )
50
46
{
51
- for ( var i = 0 ; i < HashMD5 . Length ; i ++ )
52
- {
53
- HashMD5 [ i ] = p [ i ] ;
54
- }
47
+ HashMD5 [ i ] = cert ->HashMD5 [ i ] ;
55
48
}
56
49
57
50
HashSHA1 = new byte [ 20 ] ;
58
- fixed ( byte * p = & HashSHA1 [ 0 ] )
51
+ for ( var i = 0 ; i < HashSHA1 . Length ; i ++ )
59
52
{
60
- for ( var i = 0 ; i < HashSHA1 . Length ; i ++ )
61
- {
62
- HashSHA1 [ i ] = p [ i ] ;
63
- }
53
+ HashSHA1 [ i ] = cert ->HashSHA1 [ i ] ;
64
54
}
65
55
}
66
56
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ internal unsafe struct git_certificate_ssh
14
14
public unsafe fixed byte HashMD5 [ 16 ] ;
15
15
16
16
/// <summary>
17
- /// The MD5 hash (if appropriate)
17
+ /// The SHA1 hash (if appropriate)
18
18
/// </summary>
19
19
public unsafe fixed byte HashSHA1 [ 20 ] ;
20
20
}
You can’t perform that action at this time.
0 commit comments