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
- XmlLoader.cs
- UserControl.cs
- ButtonBaseAutomationPeer.cs
- TypeHelper.cs
- ListViewUpdateEventArgs.cs
- ManifestSignatureInformation.cs
- FormsAuthenticationConfiguration.cs
- TypeInfo.cs
- ListenerAdapterBase.cs
- ChangePassword.cs
- XmlSchemaAttributeGroup.cs
- CodeExpressionStatement.cs
- SHA1Managed.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- ISFClipboardData.cs
- IdentityValidationException.cs
- DataServiceHost.cs
- AsymmetricKeyExchangeDeformatter.cs
- CategoryGridEntry.cs
- DisplayInformation.cs
- LogLogRecordHeader.cs
- ColorConverter.cs
- ReadOnlyHierarchicalDataSource.cs
- SQLCharsStorage.cs
- GenericEnumerator.cs
- DropDownList.cs
- WindowInteropHelper.cs
- SqlBulkCopyColumnMappingCollection.cs
- CodeMemberEvent.cs
- BindingGroup.cs
- Timer.cs
- BamlRecordReader.cs
- DetailsViewUpdateEventArgs.cs
- JpegBitmapDecoder.cs
- BindingGroup.cs
- ListParagraph.cs
- CryptoKeySecurity.cs
- EncoderReplacementFallback.cs
- _NegotiateClient.cs
- wgx_sdk_version.cs
- DesignerValidatorAdapter.cs
- Slider.cs
- InputBinding.cs
- TransactionManager.cs
- DateTimeConverter2.cs
- TrackingAnnotationCollection.cs
- EnvironmentPermission.cs
- OpenFileDialog.cs
- PtsContext.cs
- HttpResponseInternalWrapper.cs
- PropertyDescriptorCollection.cs
- HtmlInputSubmit.cs
- SqlFormatter.cs
- IFlowDocumentViewer.cs
- Cursors.cs
- ChildTable.cs
- EntityCodeGenerator.cs
- SqlBulkCopyColumnMapping.cs
- PolicyVersion.cs
- SequentialWorkflowHeaderFooter.cs
- SqlServer2KCompatibilityAnnotation.cs
- SmiTypedGetterSetter.cs
- VerticalAlignConverter.cs
- DocumentsTrace.cs
- InvokeMethod.cs
- ObjectStateManagerMetadata.cs
- DateRangeEvent.cs
- SqlInternalConnection.cs
- COM2ColorConverter.cs
- SafeEventHandle.cs
- GridViewPageEventArgs.cs
- SerializationAttributes.cs
- IPAddressCollection.cs
- ResXResourceReader.cs
- AuthorizationPolicyTypeElement.cs
- XamlSerializer.cs
- CompilationLock.cs
- BoolExpressionVisitors.cs
- ObjectNavigationPropertyMapping.cs
- _UriSyntax.cs
- DataGridToolTip.cs
- DynamicRenderer.cs
- ListItemParagraph.cs
- RoleGroup.cs
- FeatureSupport.cs
- ScriptingWebServicesSectionGroup.cs
- SortDescription.cs
- SqlNotificationEventArgs.cs
- Converter.cs
- PreProcessInputEventArgs.cs
- NamedObjectList.cs
- Compiler.cs
- GenericParameterDataContract.cs
- TextRange.cs
- _ConnectionGroup.cs
- SqlServer2KCompatibilityAnnotation.cs
- TableRow.cs
- ClusterSafeNativeMethods.cs
- CodeDOMProvider.cs
- AnalyzedTree.cs