Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Security / Cryptography / HMACSHA1.cs / 1305376 / HMACSHA1.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //[....] // // // HMACSHA1.cs // namespace System.Security.Cryptography { [System.Runtime.InteropServices.ComVisible(true)] public class HMACSHA1 : HMAC { // // public constructors // public HMACSHA1 () : this (Utils.GenerateRandom(64)) {} public HMACSHA1 (byte[] key) : this (key, false) {} public HMACSHA1 (byte[] key, bool useManagedSha1) { m_hashName = "SHA1"; #if FEATURE_CRYPTO if (useManagedSha1) { #endif // FEATURE_CRYPTO m_hash1 = new SHA1Managed(); m_hash2 = new SHA1Managed(); #if FEATURE_CRYPTO } else { m_hash1 = new SHA1CryptoServiceProvider(); m_hash2 = new SHA1CryptoServiceProvider(); } #endif // FEATURE_CRYPTO HashSizeValue = 160; base.InitializeKey(key); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //[....] // // // HMACSHA1.cs // namespace System.Security.Cryptography { [System.Runtime.InteropServices.ComVisible(true)] public class HMACSHA1 : HMAC { // // public constructors // public HMACSHA1 () : this (Utils.GenerateRandom(64)) {} public HMACSHA1 (byte[] key) : this (key, false) {} public HMACSHA1 (byte[] key, bool useManagedSha1) { m_hashName = "SHA1"; #if FEATURE_CRYPTO if (useManagedSha1) { #endif // FEATURE_CRYPTO m_hash1 = new SHA1Managed(); m_hash2 = new SHA1Managed(); #if FEATURE_CRYPTO } else { m_hash1 = new SHA1CryptoServiceProvider(); m_hash2 = new SHA1CryptoServiceProvider(); } #endif // FEATURE_CRYPTO HashSizeValue = 160; base.InitializeKey(key); } } } // 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
- OracleFactory.cs
- UniformGrid.cs
- WizardSideBarListControlItem.cs
- EventDescriptorCollection.cs
- Pts.cs
- _SSPIWrapper.cs
- WebPartTransformer.cs
- TypeConverterBase.cs
- ContentType.cs
- WebAdminConfigurationHelper.cs
- Size3DValueSerializer.cs
- LostFocusEventManager.cs
- ColumnReorderedEventArgs.cs
- FormViewModeEventArgs.cs
- SpellerHighlightLayer.cs
- DataGrid.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- CopyAction.cs
- _HeaderInfo.cs
- Boolean.cs
- TdsParameterSetter.cs
- XmlSchemaExporter.cs
- ForEach.cs
- NotifyInputEventArgs.cs
- BCLDebug.cs
- ApplicationSecurityInfo.cs
- HelpOperationInvoker.cs
- SystemFonts.cs
- TerminateSequence.cs
- ListGeneralPage.cs
- TraceUtils.cs
- SimpleApplicationHost.cs
- NativeMethods.cs
- HtmlControl.cs
- UserControlCodeDomTreeGenerator.cs
- DrawListViewItemEventArgs.cs
- ElementNotAvailableException.cs
- BrowsableAttribute.cs
- PrimitiveType.cs
- AccessDataSourceView.cs
- namescope.cs
- FontWeight.cs
- ValidatorUtils.cs
- RuntimeWrappedException.cs
- ModuleElement.cs
- Journal.cs
- SetIterators.cs
- PageAdapter.cs
- NavigationProperty.cs
- CachedBitmap.cs
- CreateUserWizard.cs
- SafeThemeHandle.cs
- HostExecutionContextManager.cs
- UnlockInstanceCommand.cs
- RecipientServiceModelSecurityTokenRequirement.cs
- EventEntry.cs
- SqlRowUpdatedEvent.cs
- KoreanCalendar.cs
- PolicyManager.cs
- XPathNodeInfoAtom.cs
- HebrewNumber.cs
- EnumerableValidator.cs
- figurelength.cs
- VolatileResourceManager.cs
- AsyncResult.cs
- SecurityRequiresReviewAttribute.cs
- Item.cs
- ResourceContainerWrapper.cs
- XmlDictionary.cs
- streamingZipPartStream.cs
- DataControlFieldHeaderCell.cs
- SqlCachedBuffer.cs
- EntityDataSourceReferenceGroup.cs
- DataViewManager.cs
- SafeThemeHandle.cs
- webeventbuffer.cs
- SoapAttributeAttribute.cs
- ControlPropertyNameConverter.cs
- MetadataItem_Static.cs
- InfocardExtendedInformationEntry.cs
- TreeNodeBindingCollection.cs
- CalendarDateChangedEventArgs.cs
- ActivityDesignerResources.cs
- KeyTimeConverter.cs
- AssemblyAttributesGoHere.cs
- SoapServerProtocol.cs
- CursorInteropHelper.cs
- Schema.cs
- LoginName.cs
- Brush.cs
- DebugViewWriter.cs
- ObjectDataSourceSelectingEventArgs.cs
- RemoteCryptoTokenProvider.cs
- RemotingConfigParser.cs
- SHA1CryptoServiceProvider.cs
- BaseServiceProvider.cs
- HtmlInputPassword.cs
- isolationinterop.cs
- ApplicationBuildProvider.cs
- ProxyAssemblyNotLoadedException.cs