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
- StreamWriter.cs
- LabelLiteral.cs
- MenuItemBindingCollection.cs
- ReadOnlyObservableCollection.cs
- ArrangedElement.cs
- LambdaCompiler.Lambda.cs
- HTMLTagNameToTypeMapper.cs
- PersonalizationStateInfo.cs
- ProfileInfo.cs
- _NegoState.cs
- WebPartUtil.cs
- DigitalSignatureProvider.cs
- ActivityPreviewDesigner.cs
- ContextBase.cs
- EtwTrace.cs
- AdCreatedEventArgs.cs
- VisualStyleElement.cs
- Light.cs
- SortedList.cs
- PointCollectionConverter.cs
- NameScopePropertyAttribute.cs
- FontCacheUtil.cs
- DefaultTextStoreTextComposition.cs
- PersonalizableTypeEntry.cs
- HtmlPanelAdapter.cs
- BitmapEffectInput.cs
- ObjectNavigationPropertyMapping.cs
- RenderingBiasValidation.cs
- Literal.cs
- CriticalFinalizerObject.cs
- IdentityHolder.cs
- ExpressionStringBuilder.cs
- DesignerDataConnection.cs
- NavigationHelper.cs
- FrameSecurityDescriptor.cs
- Rules.cs
- InfoCardKeyedHashAlgorithm.cs
- WebPartZoneCollection.cs
- SmtpMail.cs
- TableLayoutSettings.cs
- Transform.cs
- MailFileEditor.cs
- GPRECT.cs
- NativeMethods.cs
- DBCSCodePageEncoding.cs
- DataServiceQueryProvider.cs
- ProjectionCamera.cs
- OleServicesContext.cs
- DateTimeFormatInfoScanner.cs
- BaseValidator.cs
- Tablet.cs
- EditorPartCollection.cs
- ImageAnimator.cs
- ServiceOperation.cs
- ProfileSettings.cs
- XpsS0ValidatingLoader.cs
- ListViewUpdatedEventArgs.cs
- _TimerThread.cs
- CacheMode.cs
- Border.cs
- SAPICategories.cs
- CodeAttributeArgumentCollection.cs
- SHA256Managed.cs
- PropertyInfoSet.cs
- XmlSubtreeReader.cs
- ThumbButtonInfo.cs
- DrawItemEvent.cs
- ListDictionaryInternal.cs
- LongCountAggregationOperator.cs
- TrackBarDesigner.cs
- SelectionItemPatternIdentifiers.cs
- ProcessInputEventArgs.cs
- VerticalAlignConverter.cs
- SrgsRulesCollection.cs
- CacheAxisQuery.cs
- WebConfigManager.cs
- KeyedQueue.cs
- WebPartZone.cs
- EncodingNLS.cs
- DataViewSetting.cs
- ObjectDataSourceSelectingEventArgs.cs
- MessagePartProtectionMode.cs
- GZipUtils.cs
- HitTestParameters3D.cs
- EnvironmentPermission.cs
- CircleEase.cs
- DeclaredTypeElementCollection.cs
- TextEditorMouse.cs
- GradientStopCollection.cs
- FixedSOMElement.cs
- DirectoryRootQuery.cs
- StyleSheetRefUrlEditor.cs
- TextSelectionProcessor.cs
- LinkDescriptor.cs
- TextStore.cs
- EntityKey.cs
- StandardBindingElement.cs
- SystemWebCachingSectionGroup.cs
- SessionParameter.cs
- CommonServiceBehaviorElement.cs