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
- DomainUpDown.cs
- EventArgs.cs
- InkCollectionBehavior.cs
- DefaultBindingPropertyAttribute.cs
- LineSegment.cs
- CryptoConfig.cs
- SqlCacheDependencyDatabase.cs
- EventLogPermission.cs
- CodeLinePragma.cs
- PenThread.cs
- MaskInputRejectedEventArgs.cs
- DataListCommandEventArgs.cs
- Memoizer.cs
- ContainerSelectorGlyph.cs
- HttpProxyTransportBindingElement.cs
- SmtpReplyReaderFactory.cs
- NumericPagerField.cs
- SizeKeyFrameCollection.cs
- InputLanguageProfileNotifySink.cs
- EntityTransaction.cs
- CodeStatementCollection.cs
- TextRangeEditLists.cs
- DateTimeUtil.cs
- ActiveXHost.cs
- Fonts.cs
- Panel.cs
- SelectedPathEditor.cs
- SHA512.cs
- LinearGradientBrush.cs
- EpmCustomContentDeSerializer.cs
- FileChangesMonitor.cs
- QilScopedVisitor.cs
- DateTimeParse.cs
- HwndSourceKeyboardInputSite.cs
- CatalogPart.cs
- Random.cs
- DataRowIndexBuffer.cs
- ArgumentNullException.cs
- WmlValidationSummaryAdapter.cs
- Fault.cs
- HtmlDocument.cs
- ParamArrayAttribute.cs
- DataGridViewBindingCompleteEventArgs.cs
- CfgParser.cs
- EndCreateSecurityTokenRequest.cs
- MetaData.cs
- RequestUriProcessor.cs
- EventSinkHelperWriter.cs
- PropertyInformationCollection.cs
- BinaryReader.cs
- WindowsAuthenticationModule.cs
- Function.cs
- AttributedMetaModel.cs
- ValidationRule.cs
- IdnMapping.cs
- EditorServiceContext.cs
- LayoutEngine.cs
- TableChangeProcessor.cs
- NameValuePair.cs
- QueryCacheKey.cs
- RepeaterCommandEventArgs.cs
- TextRangeEdit.cs
- PropertyEmitterBase.cs
- GridSplitterAutomationPeer.cs
- SSmlParser.cs
- SolidBrush.cs
- FlowDecisionDesigner.xaml.cs
- LightweightEntityWrapper.cs
- ConfigXmlWhitespace.cs
- ConnectionStringsExpressionBuilder.cs
- ToolStripPanelSelectionGlyph.cs
- StatusBar.cs
- OutOfProcStateClientManager.cs
- linebase.cs
- CounterSampleCalculator.cs
- FloatUtil.cs
- RemoteWebConfigurationHostServer.cs
- ResolveNameEventArgs.cs
- Menu.cs
- ReturnEventArgs.cs
- ParameterCollection.cs
- BinarySecretSecurityToken.cs
- DynamicValueConverter.cs
- ModulesEntry.cs
- Serializer.cs
- ConvertersCollection.cs
- MethodImplAttribute.cs
- XmlSecureResolver.cs
- Rect3D.cs
- DesignerToolStripControlHost.cs
- CompiledRegexRunner.cs
- unsafenativemethodstextservices.cs
- ContractListAdapter.cs
- ContentPlaceHolderDesigner.cs
- SqlConnectionFactory.cs
- ArrayList.cs
- VoiceObjectToken.cs
- EventDescriptor.cs
- IntegrationExceptionEventArgs.cs
- GridItemCollection.cs