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
- OdbcConnectionHandle.cs
- EventlogProvider.cs
- TranslateTransform3D.cs
- Size3DConverter.cs
- StringAttributeCollection.cs
- ResourceManagerWrapper.cs
- RuntimeCompatibilityAttribute.cs
- StringWriter.cs
- JsonSerializer.cs
- DataControlFieldHeaderCell.cs
- SqlAliasesReferenced.cs
- BindingExpressionUncommonField.cs
- FontResourceCache.cs
- ChangeConflicts.cs
- ContentType.cs
- PrimitiveType.cs
- UntypedNullExpression.cs
- WebPartTransformer.cs
- StandardToolWindows.cs
- RayMeshGeometry3DHitTestResult.cs
- NotSupportedException.cs
- XmlTextReaderImpl.cs
- CapabilitiesPattern.cs
- HybridDictionary.cs
- Metafile.cs
- Scene3D.cs
- CustomCategoryAttribute.cs
- PathSegment.cs
- ProcessingInstructionAction.cs
- HttpRawResponse.cs
- TemplateControlCodeDomTreeGenerator.cs
- DiscoveryDocumentSearchPattern.cs
- GeometryCombineModeValidation.cs
- XmlSchemaImport.cs
- PropertyEntry.cs
- HMACRIPEMD160.cs
- DispatchOperationRuntime.cs
- SafePEFileHandle.cs
- DataGridViewRowPrePaintEventArgs.cs
- SafeBitVector32.cs
- ConfigXmlElement.cs
- CqlErrorHelper.cs
- cryptoapiTransform.cs
- CultureMapper.cs
- PopupEventArgs.cs
- OleDbConnection.cs
- EmptyElement.cs
- Help.cs
- MembershipUser.cs
- RbTree.cs
- InProcStateClientManager.cs
- StorageMappingFragment.cs
- BitmapFrameDecode.cs
- ClearTypeHintValidation.cs
- WindowsScroll.cs
- FormsAuthenticationCredentials.cs
- WCFBuildProvider.cs
- RegexGroupCollection.cs
- ConfigXmlCDataSection.cs
- _IPv6Address.cs
- InputMethodStateChangeEventArgs.cs
- MetadataCacheItem.cs
- DesignerDeviceConfig.cs
- ListItemParagraph.cs
- TextContainer.cs
- Blend.cs
- GlyphRunDrawing.cs
- SinglePageViewer.cs
- XamlSerializationHelper.cs
- UndoManager.cs
- BrowsableAttribute.cs
- TdsParserSessionPool.cs
- MemberAccessException.cs
- ItemType.cs
- CompoundFileDeflateTransform.cs
- ResourcePart.cs
- PlaceHolder.cs
- Vector3DValueSerializer.cs
- BindingCompleteEventArgs.cs
- Cursors.cs
- StringAnimationUsingKeyFrames.cs
- EntitySqlQueryCacheEntry.cs
- FlowDocumentScrollViewer.cs
- Vector.cs
- PersonalizationEntry.cs
- StringWriter.cs
- GetWorkflowTree.cs
- SubtreeProcessor.cs
- ItemContainerGenerator.cs
- ListView.cs
- TraceContext.cs
- DataGridViewComboBoxEditingControl.cs
- EventLogPermissionAttribute.cs
- HotCommands.cs
- DrawingContextDrawingContextWalker.cs
- ByteStack.cs
- GPRECTF.cs
- ISFTagAndGuidCache.cs
- SectionVisual.cs
- Executor.cs