Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Security / Cryptography / MD5CryptoServiceProvider.cs / 1 / MD5CryptoServiceProvider.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // // MD5CryptoServiceProvider.cs // namespace System.Security.Cryptography { [System.Runtime.InteropServices.ComVisible(true)] public sealed class MD5CryptoServiceProvider : MD5 { private SafeHashHandle _safeHashHandle = null; // // public constructors // public MD5CryptoServiceProvider() { if (Utils.FipsAlgorithmPolicy == 1) throw new InvalidOperationException(Environment.GetResourceString("Cryptography_NonCompliantFIPSAlgorithm")); SafeHashHandle safeHashHandle = SafeHashHandle.InvalidHandle; // _CreateHash will Utils._CreateHash(Utils.StaticProvHandle, Constants.CALG_MD5, ref safeHashHandle); _safeHashHandle = safeHashHandle; } protected override void Dispose(bool disposing) { if (_safeHashHandle != null && !_safeHashHandle.IsClosed) _safeHashHandle.Dispose(); base.Dispose(disposing); } // // public methods // public override void Initialize() { if (_safeHashHandle != null && !_safeHashHandle.IsClosed) _safeHashHandle.Dispose(); SafeHashHandle safeHashHandle = SafeHashHandle.InvalidHandle; // _CreateHash will Utils._CreateHash(Utils.StaticProvHandle, Constants.CALG_MD5, ref safeHashHandle); _safeHashHandle = safeHashHandle; } protected override void HashCore(byte[] rgb, int ibStart, int cbSize) { Utils._HashData(_safeHashHandle, rgb, ibStart, cbSize); } protected override byte[] HashFinal() { return Utils._EndHash(_safeHashHandle); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DelegateTypeInfo.cs
- DeclarationUpdate.cs
- InvalidCastException.cs
- FragmentQueryProcessor.cs
- WebPartActionVerb.cs
- StyleTypedPropertyAttribute.cs
- SamlSubjectStatement.cs
- XslTransformFileEditor.cs
- SmiTypedGetterSetter.cs
- TextAction.cs
- HtmlButton.cs
- MetadataStore.cs
- MdImport.cs
- PropertyRecord.cs
- ActivityWithResultWrapper.cs
- DataSourceXmlSubItemAttribute.cs
- SqlBulkCopyColumnMapping.cs
- TextSelectionHighlightLayer.cs
- DbReferenceCollection.cs
- DataServiceConfiguration.cs
- SizeAnimationBase.cs
- RectConverter.cs
- GridViewPageEventArgs.cs
- FlowDocument.cs
- SetterBase.cs
- PaintValueEventArgs.cs
- Inflater.cs
- AdvancedBindingEditor.cs
- ColorAnimationUsingKeyFrames.cs
- SmtpLoginAuthenticationModule.cs
- DataGridViewHeaderCell.cs
- CompilerLocalReference.cs
- DatePickerDateValidationErrorEventArgs.cs
- CapiSymmetricAlgorithm.cs
- Decoder.cs
- _NestedSingleAsyncResult.cs
- ButtonFieldBase.cs
- CommandDevice.cs
- SchemaSetCompiler.cs
- TransformerConfigurationWizardBase.cs
- LiteralText.cs
- SizeValueSerializer.cs
- DefaultExpression.cs
- WinFormsSecurity.cs
- SiteMapNodeItemEventArgs.cs
- DbConnectionClosed.cs
- TextBox.cs
- PointCollection.cs
- CompilationUtil.cs
- ScrollEvent.cs
- IsolatedStoragePermission.cs
- DesignerTextWriter.cs
- DerivedKeySecurityToken.cs
- HyperLinkColumn.cs
- LinqDataSourceHelper.cs
- ControlCachePolicy.cs
- RolePrincipal.cs
- NumberFormatInfo.cs
- EllipticalNodeOperations.cs
- OleDbRowUpdatedEvent.cs
- HwndSubclass.cs
- InheritanceAttribute.cs
- TaskSchedulerException.cs
- TextBox.cs
- CmsUtils.cs
- DataGridViewSelectedRowCollection.cs
- MemberInfoSerializationHolder.cs
- Pair.cs
- StaticExtensionConverter.cs
- ChannelServices.cs
- ConditionalExpression.cs
- DataGridView.cs
- Translator.cs
- InArgument.cs
- SimplePropertyEntry.cs
- SqlProfileProvider.cs
- DataBoundLiteralControl.cs
- ADMembershipProvider.cs
- RadioButtonList.cs
- WebPartMenuStyle.cs
- TrackPoint.cs
- SafeEventLogReadHandle.cs
- APCustomTypeDescriptor.cs
- EncodingStreamWrapper.cs
- HWStack.cs
- ToolTipService.cs
- LoginName.cs
- TableRowCollection.cs
- CommonObjectSecurity.cs
- AnnotationDocumentPaginator.cs
- ObjectAssociationEndMapping.cs
- ResourcePermissionBaseEntry.cs
- FileDialogCustomPlaces.cs
- FormViewDeleteEventArgs.cs
- SafeEventLogWriteHandle.cs
- NameTable.cs
- counter.cs
- ToolBar.cs
- SqlDesignerDataSourceView.cs
- Point3DConverter.cs