Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Security / Cryptography / SHA1CryptoServiceProvider.cs / 1305376 / 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 { [System.Security.SecurityCritical /*auto-generated*/] private SafeHashHandle _safeHashHandle = null; // // public constructors // [System.Security.SecuritySafeCritical] // auto-generated public SHA1CryptoServiceProvider() { // _CreateHash will check for failures and throw the appropriate exception _safeHashHandle = Utils.CreateHash(Utils.StaticProvHandle, Constants.CALG_SHA1); } [System.Security.SecuritySafeCritical] // overrides public transparent member protected override void Dispose(bool disposing) { if (_safeHashHandle != null && !_safeHashHandle.IsClosed) _safeHashHandle.Dispose(); // call the base class's Dispose base.Dispose(disposing); } // // public methods // [System.Security.SecuritySafeCritical] // auto-generated public override void Initialize() { if (_safeHashHandle != null && !_safeHashHandle.IsClosed) _safeHashHandle.Dispose(); // _CreateHash will check for failures and throw the appropriate exception _safeHashHandle = Utils.CreateHash(Utils.StaticProvHandle, Constants.CALG_SHA1); } [System.Security.SecuritySafeCritical] // overrides protected transparent member protected override void HashCore(byte[] rgb, int ibStart, int cbSize) { Utils.HashData(_safeHashHandle, rgb, ibStart, cbSize); } [System.Security.SecuritySafeCritical] // overrides protected transparent member protected override byte[] HashFinal() { return Utils.EndHash(_safeHashHandle); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PeerEndPoint.cs
- QilFactory.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- Attributes.cs
- ItemCheckedEvent.cs
- ProofTokenCryptoHandle.cs
- CssTextWriter.cs
- SQLDoubleStorage.cs
- EditorPartCollection.cs
- InputLangChangeRequestEvent.cs
- PartialCachingAttribute.cs
- FixedDocumentSequencePaginator.cs
- GeometryHitTestParameters.cs
- Vector3DAnimationBase.cs
- Graphics.cs
- FontStretchConverter.cs
- GenerateDerivedKeyRequest.cs
- DtrList.cs
- XhtmlBasicFormAdapter.cs
- IsolatedStorageFilePermission.cs
- InitializingNewItemEventArgs.cs
- XmlSerializerFaultFormatter.cs
- X509ThumbprintKeyIdentifierClause.cs
- ModulesEntry.cs
- Int32CollectionValueSerializer.cs
- ChannelDispatcherCollection.cs
- HashFinalRequest.cs
- AutomationAttributeInfo.cs
- AssemblyCollection.cs
- PassportAuthenticationModule.cs
- DurationConverter.cs
- CreateRefExpr.cs
- StringReader.cs
- GradientSpreadMethodValidation.cs
- OrderPreservingPipeliningMergeHelper.cs
- TagNameToTypeMapper.cs
- ReaderWriterLockSlim.cs
- CssTextWriter.cs
- RotateTransform3D.cs
- CodeChecksumPragma.cs
- HtmlMeta.cs
- NonDualMessageSecurityOverHttp.cs
- TabControlAutomationPeer.cs
- Publisher.cs
- SessionStateSection.cs
- EntryIndex.cs
- ActivityXRefPropertyEditor.cs
- XamlReader.cs
- ConfigurationValues.cs
- PriorityItem.cs
- TrackPointCollection.cs
- TextServicesLoader.cs
- EndpointAddressMessageFilter.cs
- ColumnMapVisitor.cs
- ApplicationHost.cs
- MasterPage.cs
- CollectionViewGroupInternal.cs
- PhysicalAddress.cs
- SqlAliaser.cs
- UpdateTracker.cs
- WebPartHeaderCloseVerb.cs
- PropertyTabChangedEvent.cs
- MemoryMappedViewStream.cs
- CoTaskMemHandle.cs
- unsafenativemethodsother.cs
- SessionSwitchEventArgs.cs
- XmlAnyElementAttributes.cs
- FormViewPagerRow.cs
- NameSpaceExtractor.cs
- CacheRequest.cs
- BinaryNode.cs
- Vector3DAnimationBase.cs
- Transform.cs
- AuthenticationModuleElement.cs
- NotifyParentPropertyAttribute.cs
- ExpressionConverter.cs
- ChtmlPageAdapter.cs
- TextDecoration.cs
- RectangleGeometry.cs
- SecurityIdentifierElement.cs
- SchemaInfo.cs
- BuildProviderCollection.cs
- NamespaceList.cs
- PassportAuthenticationEventArgs.cs
- DiscoveryInnerClientAdhoc11.cs
- DataGridAutoFormatDialog.cs
- TextDecorationCollection.cs
- TimerEventSubscription.cs
- EditCommandColumn.cs
- FileFormatException.cs
- BufferedWebEventProvider.cs
- TraceLog.cs
- ButtonBase.cs
- MergeLocalizationDirectives.cs
- TreeSet.cs
- ScrollItemPattern.cs
- Icon.cs
- SessionStateUtil.cs
- DelegatingChannelListener.cs
- StateManagedCollection.cs