Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Security / Cryptography / SHA1CryptoServiceProvider.cs / 1 / SHA1CryptoServiceProvider.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // // SHA1CryptoServiceProvider.cs // namespace System.Security.Cryptography { [System.Runtime.InteropServices.ComVisible(true)] public sealed class SHA1CryptoServiceProvider : SHA1 { private SafeHashHandle _safeHashHandle = null; // // public constructors // public SHA1CryptoServiceProvider() { SafeHashHandle safeHashHandle = SafeHashHandle.InvalidHandle; // _CreateHash will Utils._CreateHash(Utils.StaticProvHandle, Constants.CALG_SHA1, ref safeHashHandle); _safeHashHandle = safeHashHandle; } protected override void Dispose(bool disposing) { if (_safeHashHandle != null && !_safeHashHandle.IsClosed) _safeHashHandle.Dispose(); // call the base class's 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_SHA1, 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
- InternalRelationshipCollection.cs
- AutomationEventArgs.cs
- CrossAppDomainChannel.cs
- DoWorkEventArgs.cs
- Html32TextWriter.cs
- ScriptingScriptResourceHandlerSection.cs
- Label.cs
- ImageField.cs
- ConnectionsZone.cs
- EncoderParameter.cs
- ErrorFormatter.cs
- StreamHelper.cs
- IisNotInstalledException.cs
- MenuBase.cs
- SafeArrayRankMismatchException.cs
- DataGridViewLinkCell.cs
- Attributes.cs
- ExceptionHelpers.cs
- TypeConverterValueSerializer.cs
- BookmarkTable.cs
- CatalogPartCollection.cs
- DeferrableContent.cs
- SQLConvert.cs
- SecurityDocument.cs
- CodeDirectiveCollection.cs
- DecimalStorage.cs
- DiscoveryClientProtocol.cs
- HtmlTableRowCollection.cs
- PlaceHolder.cs
- ScaleTransform.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- Setter.cs
- IndexedGlyphRun.cs
- translator.cs
- ServiceHostingEnvironment.cs
- SafeCryptoHandles.cs
- ColumnMapProcessor.cs
- XamlSerializerUtil.cs
- Expr.cs
- NotImplementedException.cs
- ScalarConstant.cs
- ConnectionInterfaceCollection.cs
- QueryStringParameter.cs
- PointIndependentAnimationStorage.cs
- ToolStripStatusLabel.cs
- Container.cs
- Pen.cs
- SimpleLine.cs
- TrackPoint.cs
- FormsAuthenticationModule.cs
- CutCopyPasteHelper.cs
- BackgroundWorker.cs
- PeerNearMe.cs
- StylusEventArgs.cs
- ArithmeticLiteral.cs
- DataGridViewColumnStateChangedEventArgs.cs
- PropertyStore.cs
- TreeView.cs
- HitTestWithPointDrawingContextWalker.cs
- StronglyTypedResourceBuilder.cs
- InvokerUtil.cs
- SamlAuthorizationDecisionClaimResource.cs
- TypeUsageBuilder.cs
- DesignerForm.cs
- AssemblyName.cs
- KeyNotFoundException.cs
- DbMetaDataCollectionNames.cs
- SqlDataSourceFilteringEventArgs.cs
- SafeBitVector32.cs
- ITextView.cs
- OdbcTransaction.cs
- SimpleHandlerFactory.cs
- SolidBrush.cs
- SqlMetaData.cs
- AddingNewEventArgs.cs
- ListItem.cs
- RectAnimationUsingKeyFrames.cs
- RayHitTestParameters.cs
- SettingsPropertyNotFoundException.cs
- OutputCacheSettingsSection.cs
- FixedPosition.cs
- _BufferOffsetSize.cs
- LazyTextWriterCreator.cs
- util.cs
- ReferencedType.cs
- DataGridState.cs
- SectionInformation.cs
- UIAgentAsyncEndRequest.cs
- SafeRightsManagementHandle.cs
- ContextProperty.cs
- ColumnWidthChangedEvent.cs
- StackBuilderSink.cs
- FontUnit.cs
- ProjectedSlot.cs
- OpenFileDialog.cs
- CommandExpr.cs
- CreateUserWizardStep.cs
- Shape.cs
- Module.cs
- RuntimeConfig.cs