Jump to content
AC

Cannot convert the usage of System.Security.Cryptography.HashAlgorithm class

Recommended Posts

I wrote the following code in my Windows Phone Silverlight 8.1 project:
 
internal class MD5Managed : HashAlgorithm
{
    private ABCDStruct _abcd;
    ...
    ...
 
    public MD5Managed()
    {
        HashSizeValue = 0x80;
        Initialize();
    }
 
    public override sealed void Initialize()
    {
        ...
        ...
    }
 
}
 
As you see, I inherit System.Security.Cryptography.HashAlgorithm class.
After I use "Silverlight bridge to UWP" to convert my project to uwp,
the app cannot run,
it shows message "The type or namespace name could not be found (are you missing a using directive or an assembly reference",
What should I do?
 
Thanks
Alex

Share this post


Link to post
Share on other sites

Hi AC !

System.Security.Cryptography namespace changed considerably between UWP and WIndows Phone SL APIs.  There is not current mapping for it in the tool so you need to refactor your code in order to make it compile and run with the new API.

I hope it helps you !

Regards,

Olman

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use