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
- AppDomainShutdownMonitor.cs
- TabControl.cs
- IdentityHolder.cs
- SqlRowUpdatingEvent.cs
- rsa.cs
- StyleSheetRefUrlEditor.cs
- Pens.cs
- BackEase.cs
- Point4D.cs
- FixedStringLookup.cs
- _FtpControlStream.cs
- DocumentCollection.cs
- X509UI.cs
- EditingCommands.cs
- ResourcePart.cs
- SqlBulkCopyColumnMappingCollection.cs
- SpanIndex.cs
- FormattedText.cs
- MailDefinition.cs
- Viewport3DAutomationPeer.cs
- SecurityTokenProvider.cs
- EmptyElement.cs
- ListChangedEventArgs.cs
- SmiEventSink_DeferedProcessing.cs
- RuntimeResourceSet.cs
- LocalizationCodeDomSerializer.cs
- TreeView.cs
- NumberAction.cs
- UnSafeCharBuffer.cs
- CompositeDuplexBindingElementImporter.cs
- ApplicationCommands.cs
- __TransparentProxy.cs
- DecimalAnimationBase.cs
- XmlParserContext.cs
- BamlVersionHeader.cs
- SignedXml.cs
- CustomAttributeSerializer.cs
- NameValueConfigurationCollection.cs
- DataList.cs
- XamlStyleSerializer.cs
- ToolStripContainerActionList.cs
- PropertyValueUIItem.cs
- Renderer.cs
- ZoneIdentityPermission.cs
- ToolboxSnapDragDropEventArgs.cs
- TextOutput.cs
- FileChangeNotifier.cs
- RIPEMD160.cs
- SerialErrors.cs
- MetadataPropertyAttribute.cs
- RtfNavigator.cs
- EllipseGeometry.cs
- SelectionItemProviderWrapper.cs
- ParameterToken.cs
- SubclassTypeValidatorAttribute.cs
- HttpCapabilitiesSectionHandler.cs
- RuntimeConfig.cs
- HtmlListAdapter.cs
- RSAOAEPKeyExchangeDeformatter.cs
- KeyGestureValueSerializer.cs
- EqualityComparer.cs
- FixedStringLookup.cs
- TypeSystemHelpers.cs
- StrokeCollection.cs
- InvalidDataException.cs
- ConditionalBranch.cs
- MSAAWinEventWrap.cs
- ProcessHostMapPath.cs
- FrameSecurityDescriptor.cs
- TextLineBreak.cs
- NavigationPropertyEmitter.cs
- GradientBrush.cs
- DeadCharTextComposition.cs
- ByteConverter.cs
- UnhandledExceptionEventArgs.cs
- SqlServer2KCompatibilityCheck.cs
- DebuggerAttributes.cs
- MimeObjectFactory.cs
- BitmapCodecInfoInternal.cs
- datacache.cs
- CollectionTypeElement.cs
- ForwardPositionQuery.cs
- DependsOnAttribute.cs
- DataStreams.cs
- RegistryPermission.cs
- _BaseOverlappedAsyncResult.cs
- ColumnPropertiesGroup.cs
- TextEffectCollection.cs
- ServicePoint.cs
- SerializationInfoEnumerator.cs
- ParameterSubsegment.cs
- ClosableStream.cs
- ManagementNamedValueCollection.cs
- DnsEndPoint.cs
- Debugger.cs
- EventRoute.cs
- CharAnimationUsingKeyFrames.cs
- VectorCollectionConverter.cs
- StorageTypeMapping.cs
- DataTransferEventArgs.cs