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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

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