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
- PageVisual.cs
- objectresult_tresulttype.cs
- MessageFilter.cs
- IxmlLineInfo.cs
- IndexerHelper.cs
- SchemaDeclBase.cs
- HeaderCollection.cs
- ProcessHostMapPath.cs
- EnumerableRowCollectionExtensions.cs
- TrackBarRenderer.cs
- BinaryOperationBinder.cs
- ColorAnimationUsingKeyFrames.cs
- PageBuildProvider.cs
- ForceCopyBuildProvider.cs
- OutputCacheSettings.cs
- PackWebResponse.cs
- WebPartPersonalization.cs
- VirtualPathUtility.cs
- COSERVERINFO.cs
- SqlFormatter.cs
- EventManager.cs
- EmptyElement.cs
- NotSupportedException.cs
- StatusBarDrawItemEvent.cs
- ListControl.cs
- InputScopeManager.cs
- ButtonFieldBase.cs
- CssStyleCollection.cs
- ProcessInfo.cs
- ObjectConverter.cs
- CustomTypeDescriptor.cs
- InlinedAggregationOperatorEnumerator.cs
- MetadataArtifactLoaderCompositeResource.cs
- ExpandCollapsePattern.cs
- XamlSerializerUtil.cs
- DelegateBodyWriter.cs
- ToolStripPanelRow.cs
- SmtpSection.cs
- TextEndOfParagraph.cs
- JapaneseCalendar.cs
- ExitEventArgs.cs
- PreservationFileReader.cs
- SqlInfoMessageEvent.cs
- TypeLoader.cs
- ValidatorCompatibilityHelper.cs
- WebControlToolBoxItem.cs
- Helpers.cs
- BinaryObjectWriter.cs
- AttributeSetAction.cs
- CmsUtils.cs
- XmlMessageFormatter.cs
- UrlPropertyAttribute.cs
- RunInstallerAttribute.cs
- QualificationDataAttribute.cs
- CatalogZone.cs
- PropertyManager.cs
- SmtpClient.cs
- TimeoutValidationAttribute.cs
- FrameworkElementFactoryMarkupObject.cs
- CoTaskMemHandle.cs
- AsymmetricKeyExchangeFormatter.cs
- UDPClient.cs
- BitmapFrameDecode.cs
- VectorCollectionValueSerializer.cs
- PinnedBufferMemoryStream.cs
- Substitution.cs
- TraceSection.cs
- ColumnWidthChangedEvent.cs
- WaitingCursor.cs
- OdbcCommand.cs
- ImageField.cs
- SizeChangedEventArgs.cs
- WindowsRichEditRange.cs
- ControlOperationBehavior.cs
- RepeaterItemEventArgs.cs
- ArgumentOutOfRangeException.cs
- SmtpReplyReaderFactory.cs
- AccessorTable.cs
- EntityObject.cs
- ModelServiceImpl.cs
- WeakRefEnumerator.cs
- Convert.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- OleDbStruct.cs
- DbQueryCommandTree.cs
- ParameterCollection.cs
- QueryContinueDragEvent.cs
- MethodCallExpression.cs
- JsonCollectionDataContract.cs
- DataGridViewComboBoxEditingControl.cs
- RijndaelManagedTransform.cs
- ExclusiveTcpTransportManager.cs
- EpmSourcePathSegment.cs
- LogSwitch.cs
- BinaryParser.cs
- SqlNotificationRequest.cs
- DateTimeFormat.cs
- XmlSchemaInferenceException.cs
- RegexGroup.cs
- CriticalExceptions.cs