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
- AspCompat.cs
- XmlSchemaSimpleType.cs
- SerialStream.cs
- NavigatorInput.cs
- ObjectSpanRewriter.cs
- XmlHierarchyData.cs
- SecurityTokenValidationException.cs
- SmiMetaData.cs
- LifetimeServices.cs
- TextElementEnumerator.cs
- SoapIncludeAttribute.cs
- OpacityConverter.cs
- SystemWebSectionGroup.cs
- DbSource.cs
- CommentAction.cs
- WebRequest.cs
- SQLChars.cs
- PreloadedPackages.cs
- TextContainerHelper.cs
- ObjectViewListener.cs
- SqlDelegatedTransaction.cs
- _SSPISessionCache.cs
- TextElementEnumerator.cs
- SocketAddress.cs
- _ConnectStream.cs
- LockRecursionException.cs
- SmiEventStream.cs
- AutomationElementCollection.cs
- WindowsUpDown.cs
- _DisconnectOverlappedAsyncResult.cs
- BitmapData.cs
- PrintEvent.cs
- SoapIgnoreAttribute.cs
- RecordBuilder.cs
- SemaphoreFullException.cs
- RichTextBox.cs
- CustomErrorsSectionWrapper.cs
- CapiNative.cs
- RowUpdatingEventArgs.cs
- CompiledRegexRunner.cs
- cookieexception.cs
- TextBounds.cs
- NavigationHelper.cs
- WebPartsPersonalizationAuthorization.cs
- SafeLibraryHandle.cs
- HttpServerVarsCollection.cs
- TypeCodeDomSerializer.cs
- WindowsTitleBar.cs
- EtwTrackingBehavior.cs
- NameSpaceExtractor.cs
- ScrollChrome.cs
- ExpandSegmentCollection.cs
- CachingHintValidation.cs
- StorageSetMapping.cs
- CompareInfo.cs
- MenuScrollingVisibilityConverter.cs
- CalendarDesigner.cs
- TailCallAnalyzer.cs
- SoapIncludeAttribute.cs
- TypedReference.cs
- RichTextBoxDesigner.cs
- WebPartAddingEventArgs.cs
- SplineQuaternionKeyFrame.cs
- TimeZone.cs
- VerificationAttribute.cs
- DbLambda.cs
- ViewStateModeByIdAttribute.cs
- Int32Rect.cs
- XsltOutput.cs
- CodeTypeDelegate.cs
- RunWorkerCompletedEventArgs.cs
- ImportRequest.cs
- CopyEncoder.cs
- BroadcastEventHelper.cs
- MonitoringDescriptionAttribute.cs
- XmlArrayItemAttributes.cs
- XsdCachingReader.cs
- PathData.cs
- Int32RectConverter.cs
- NavigationWindow.cs
- EntityDataSourceStatementEditorForm.cs
- UidManager.cs
- ProfileModule.cs
- SourceChangedEventArgs.cs
- CompilerCollection.cs
- TypeSystem.cs
- SecurityContext.cs
- GrammarBuilderPhrase.cs
- GridViewRowCollection.cs
- EntitySqlQueryBuilder.cs
- MouseWheelEventArgs.cs
- ExpandSegmentCollection.cs
- BindableAttribute.cs
- CustomValidator.cs
- TypeConstant.cs
- Win32Exception.cs
- DecoderBestFitFallback.cs
- IPGlobalProperties.cs
- LinkedResourceCollection.cs
- XamlPathDataSerializer.cs