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
- SafeReversePInvokeHandle.cs
- DataGridViewImageColumn.cs
- XmlSchemas.cs
- HotSpot.cs
- VisualBasicHelper.cs
- UTF8Encoding.cs
- ParameterReplacerVisitor.cs
- FixedPage.cs
- DataContractJsonSerializer.cs
- DateBoldEvent.cs
- MultipartIdentifier.cs
- SamlAuthenticationStatement.cs
- safex509handles.cs
- StoragePropertyMapping.cs
- errorpatternmatcher.cs
- FileFormatException.cs
- MatrixTransform3D.cs
- TableHeaderCell.cs
- SecurityDocument.cs
- PositiveTimeSpanValidatorAttribute.cs
- TraceContext.cs
- RegexEditorDialog.cs
- RegisteredExpandoAttribute.cs
- MetaType.cs
- CryptoStream.cs
- ObservableDictionary.cs
- MaterialCollection.cs
- AnimationClockResource.cs
- DSASignatureFormatter.cs
- OrderedEnumerableRowCollection.cs
- GroupedContextMenuStrip.cs
- ClassicBorderDecorator.cs
- AuthenticationManager.cs
- Persist.cs
- RelationshipManager.cs
- GuidTagList.cs
- Propagator.ExtentPlaceholderCreator.cs
- FixedSOMTableRow.cs
- ControlCodeDomSerializer.cs
- DataGridViewRowStateChangedEventArgs.cs
- TagNameToTypeMapper.cs
- MachineKeyConverter.cs
- ADConnectionHelper.cs
- AvTraceFormat.cs
- SoapFault.cs
- X509RawDataKeyIdentifierClause.cs
- SiteMapSection.cs
- DefaultValueConverter.cs
- ParallelLoopState.cs
- EdmConstants.cs
- DocumentOrderQuery.cs
- DBCommand.cs
- RegularExpressionValidator.cs
- KeyTime.cs
- RedBlackList.cs
- PeerApplication.cs
- LayoutInformation.cs
- DeviceContext2.cs
- WindowsStreamSecurityElement.cs
- QueryProcessor.cs
- SqlReorderer.cs
- GlyphShapingProperties.cs
- SchemaImporter.cs
- TypeLoadException.cs
- AtlasWeb.Designer.cs
- OperationContextScope.cs
- BufferedGraphics.cs
- ModelItemCollection.cs
- SqlGenericUtil.cs
- SemanticResultKey.cs
- CreatingCookieEventArgs.cs
- VirtualDirectoryMappingCollection.cs
- FieldNameLookup.cs
- SqlBuilder.cs
- remotingproxy.cs
- InfoCardClaimCollection.cs
- SafeNativeMethods.cs
- RuntimeConfigLKG.cs
- Event.cs
- WaveHeader.cs
- OutputScopeManager.cs
- ScopelessEnumAttribute.cs
- ChtmlMobileTextWriter.cs
- ProfilePropertySettings.cs
- PersonalizablePropertyEntry.cs
- IntMinMaxAggregationOperator.cs
- CompareValidator.cs
- HtmlAnchor.cs
- LookupNode.cs
- InvalidCastException.cs
- CleanUpVirtualizedItemEventArgs.cs
- DecoderNLS.cs
- RectAnimation.cs
- SecurityPermission.cs
- SecurityElementBase.cs
- CursorInteropHelper.cs
- ListView.cs
- StoreContentChangedEventArgs.cs
- UriTemplateTrieLocation.cs
- FlowDocumentReaderAutomationPeer.cs