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
- WindowsSolidBrush.cs
- SqlDependencyUtils.cs
- Metafile.cs
- BoundField.cs
- CollectionType.cs
- XmlSchemaImport.cs
- HtmlTableCell.cs
- LabelAutomationPeer.cs
- SelectionHighlightInfo.cs
- FixedTextPointer.cs
- SafeNativeMethodsOther.cs
- TransactionInformation.cs
- EnumerableWrapperWeakToStrong.cs
- ContentHostHelper.cs
- IdentityManager.cs
- OleDbConnectionFactory.cs
- BindingWorker.cs
- OneOfScalarConst.cs
- userdatakeys.cs
- BaseComponentEditor.cs
- Rect3DValueSerializer.cs
- DeleteHelper.cs
- DataListItemCollection.cs
- SchemaLookupTable.cs
- ToggleProviderWrapper.cs
- RoutedCommand.cs
- TextEditorTyping.cs
- AstTree.cs
- PreApplicationStartMethodAttribute.cs
- BezierSegment.cs
- returneventsaver.cs
- TimeoutTimer.cs
- ApplicationFileParser.cs
- GridEntry.cs
- AdornerHitTestResult.cs
- LogEntrySerializationException.cs
- SqlClientWrapperSmiStreamChars.cs
- Accessible.cs
- XmlDocumentFragment.cs
- ActivatableWorkflowsQueryResult.cs
- ContentPresenter.cs
- Avt.cs
- ConnectionsZone.cs
- TreeNodeMouseHoverEvent.cs
- ButtonChrome.cs
- XamlWriter.cs
- NativeMethods.cs
- ClientTargetSection.cs
- ListViewSortEventArgs.cs
- DesignerForm.cs
- DataBindEngine.cs
- SourceSwitch.cs
- DataServicePagingProviderWrapper.cs
- RequestSecurityTokenSerializer.cs
- WebBrowserProgressChangedEventHandler.cs
- PrtTicket_Public.cs
- CellRelation.cs
- DataTemplateKey.cs
- LineMetrics.cs
- SerializationSectionGroup.cs
- codemethodreferenceexpression.cs
- XamlTreeBuilderBamlRecordWriter.cs
- CollectionChangedEventManager.cs
- MessageLoggingElement.cs
- DataContractSerializer.cs
- DataSourceDesigner.cs
- CannotUnloadAppDomainException.cs
- PieceNameHelper.cs
- RequestCache.cs
- SafeFileMapViewHandle.cs
- WinEventTracker.cs
- TextPointerBase.cs
- GridViewDeleteEventArgs.cs
- InitiatorSessionSymmetricTransportSecurityProtocol.cs
- dtdvalidator.cs
- _SecureChannel.cs
- Propagator.Evaluator.cs
- MenuBase.cs
- TextTreeUndo.cs
- GridViewCellAutomationPeer.cs
- WebSysDefaultValueAttribute.cs
- UpdateTranslator.cs
- _RegBlobWebProxyDataBuilder.cs
- DocumentOrderComparer.cs
- XPathDocument.cs
- UniqueConstraint.cs
- BuildManagerHost.cs
- CopyNamespacesAction.cs
- LongValidatorAttribute.cs
- QueryCacheEntry.cs
- MethodBody.cs
- UniqueConstraint.cs
- CounterSet.cs
- PageTheme.cs
- CallSiteBinder.cs
- SoapException.cs
- ComboBox.cs
- SimpleTableProvider.cs
- InstanceData.cs
- XmlDesignerDataSourceView.cs