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
- RecoverInstanceLocksCommand.cs
- InternalEnumValidator.cs
- DesignerSerializationManager.cs
- NamedObject.cs
- Rule.cs
- WorkItem.cs
- RelOps.cs
- OletxEnlistment.cs
- WebPart.cs
- StackBuilderSink.cs
- XmlSchemaAll.cs
- IImplicitResourceProvider.cs
- diagnosticsswitches.cs
- LicenseContext.cs
- GlobalItem.cs
- DataRecordInfo.cs
- PlaceHolder.cs
- ImageSourceValueSerializer.cs
- Int32CollectionValueSerializer.cs
- mansign.cs
- validationstate.cs
- DataRowComparer.cs
- SchemaObjectWriter.cs
- BitSet.cs
- IsolatedStorage.cs
- UTF8Encoding.cs
- ChildDocumentBlock.cs
- ObjectCache.cs
- HtmlInputButton.cs
- RotationValidation.cs
- HttpContext.cs
- EventLogPermissionEntry.cs
- ItemCollection.cs
- HighContrastHelper.cs
- HtmlButton.cs
- ImpersonationContext.cs
- SrgsElementList.cs
- SerializableAttribute.cs
- HttpHandlersSection.cs
- TextLineResult.cs
- SqlVersion.cs
- DataGridLinkButton.cs
- TextEditorTyping.cs
- _ConnectOverlappedAsyncResult.cs
- CroppedBitmap.cs
- SspiWrapper.cs
- XsltCompileContext.cs
- FixUpCollection.cs
- Timeline.cs
- DataGridItemEventArgs.cs
- ApplicationInterop.cs
- ExpressionBuilder.cs
- PropertyChangedEventArgs.cs
- LineSegment.cs
- PolyLineSegment.cs
- WindowVisualStateTracker.cs
- LogWriteRestartAreaAsyncResult.cs
- CompoundFileDeflateTransform.cs
- UInt32Converter.cs
- SafeSystemMetrics.cs
- WebScriptMetadataFormatter.cs
- Int32.cs
- AccessKeyManager.cs
- PropertyGroupDescription.cs
- EngineSiteSapi.cs
- GeneralTransform3DTo2DTo3D.cs
- QuaternionAnimationBase.cs
- Shared.cs
- EmbossBitmapEffect.cs
- DbProviderSpecificTypePropertyAttribute.cs
- UriTemplateQueryValue.cs
- EntityStoreSchemaGenerator.cs
- InvokeWebService.cs
- SineEase.cs
- HttpContext.cs
- PrefixQName.cs
- SplitContainerDesigner.cs
- HtmlSelect.cs
- connectionpool.cs
- prompt.cs
- DataSourceHelper.cs
- XamlNamespaceHelper.cs
- ControlIdConverter.cs
- SqlDataSourceEnumerator.cs
- ComboBoxRenderer.cs
- MessageQueuePermission.cs
- TcpConnectionPool.cs
- SectionInformation.cs
- ObjectContext.cs
- NotFiniteNumberException.cs
- InternalsVisibleToAttribute.cs
- WebPartDisplayModeEventArgs.cs
- GeometryModel3D.cs
- Ray3DHitTestResult.cs
- ProjectionPathBuilder.cs
- InkCanvasInnerCanvas.cs
- Codec.cs
- HandlerBase.cs
- HttpCapabilitiesEvaluator.cs
- ToolStripProfessionalLowResolutionRenderer.cs