The encryption classes under the System.Security.Cryptography namespace are well supported in the. NET Flamework full edition. However, the corresponding class in the namespace is not provided in the compact version. The encryption algorithm used when writing Pocket PC programs in. NET is really troublesome. There are generally two ways to solve this problem. OpenNETCF (www.openetcf.org) provides simulations of various classes under the System.Security.Cryptography namespace, but it provides a lack of flexibility: for example, when symmetric encryption, users cannot set padding, Ciphermode and other attributes. And it's provided in a way that is inconsistent with the interfaces of classes under the full version of. NET, creating confusion for users. Another way is to do their own encapsulation of CryptoAPI.
MD5CryptoServiceProvider has recently been implemented for work, and the interface of this class is exactly the same as the interface below the full version.
Implementation of the "System.Security.Cryptography.MD5CryptoServiceProvider" class.
public sealed class Md5cryptoserviceprovider:md5
{
Public MD5CryptoServiceProvider ()
{
Initialize ();
m_disposed = false;
}
public override void Initialize ()
{
if (m_disposed)
throw new ObjectDisposedException (this. GetType (). FullName);
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.