Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
back to 256
  • Loading branch information
tdykstra committed Aug 3, 2020
commit 45ab38cb75f553fc4e374e280b80eb2cac5d108d
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,8 @@ int main()
// Set the culture information of the assembly to 'English-American'.
myAssemblyName->CultureInfo = gcnew CultureInfo( "en-US" );

// Set the hash algorithm to 'SHA1'.
// This example uses the SHA1 algorithm.
// Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
myAssemblyName->HashAlgorithm = AssemblyHashAlgorithm::SHA1;
// Set the hash algorithm to 'SHA256'.
myAssemblyName->HashAlgorithm = AssemblyHashAlgorithm::SHA256;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know that SHA256 actually works here.

myAssemblyName->Name = "MyAssembly";
myAssemblyName->Version = gcnew Version( "1.0.0.2001" );
MakeAssembly( myAssemblyName, "MyAssembly.exe" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,8 @@ public static void Main()
myAssemblyName.CodeBase = Directory.GetCurrentDirectory();
// Set the culture information of the assembly to 'English-American'.
myAssemblyName.CultureInfo = new CultureInfo("en-US");
// Set the hash algorithm to 'SHA1'.
// This example uses the SHA1 algorithm.
// Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
myAssemblyName.HashAlgorithm = AssemblyHashAlgorithm.SHA1;
// Set the hash algorithm to 'SHA256'.
myAssemblyName.HashAlgorithm = AssemblyHashAlgorithm.SHA256;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another triplet of AssemblyName.HashAlgorithm being updated. It might work, I just know that some parts of this system are effectively limited to MD5 and SHA1... and I don't know if this is one of them or not. (We could, of course, update them, and if we get feedback it doesn't work, then change them back)

myAssemblyName.Name = "MyAssembly";
myAssemblyName.Version = new Version("1.0.0.2001");
MakeAssembly(myAssemblyName, "MyAssembly.exe");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ Public Class AssemblyName_CodeBase
myAssemblyName.CodeBase = Directory.GetCurrentDirectory()
' Set the culture information of the assembly to 'English-American'.
myAssemblyName.CultureInfo = New CultureInfo("en-US")
' Set the hash algorithm to 'SHA1'.
' This example uses the SHA1 algorithm.
' Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
myAssemblyName.HashAlgorithm = AssemblyHashAlgorithm.SHA1
' Set the hash algorithm to 'SHA256'.
myAssemblyName.HashAlgorithm = AssemblyHashAlgorithm.SHA256
myAssemblyName.Name = "MyAssembly"
myAssemblyName.Version = New Version("1.0.0.2001")
MakeAssembly(myAssemblyName, "MyAssembly.exe")
Expand Down