Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Security / Cryptography / KeyedHashAlgorithm.cs / 1 / KeyedHashAlgorithm.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // // KeyedHashAlgorithm.cs // namespace System.Security.Cryptography { [System.Runtime.InteropServices.ComVisible(true)] public abstract class KeyedHashAlgorithm : HashAlgorithm { protected byte[] KeyValue; protected KeyedHashAlgorithm() {} // IDisposable methods protected override void Dispose(bool disposing) { // For keyed hash algorithms, we always want to zero out the key value if (disposing) { if (KeyValue != null) Array.Clear(KeyValue, 0, KeyValue.Length); KeyValue = null; } base.Dispose(disposing); } // // public properties // public virtual byte[] Key { get { return (byte[]) KeyValue.Clone(); } set { if (State != 0) throw new CryptographicException(Environment.GetResourceString("Cryptography_HashKeySet")); KeyValue = (byte[]) value.Clone(); } } // // public methods // new static public KeyedHashAlgorithm Create() { return Create("System.Security.Cryptography.KeyedHashAlgorithm"); } new static public KeyedHashAlgorithm Create(String algName) { return (KeyedHashAlgorithm) CryptoConfig.CreateFromName(algName); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataControlField.cs
- CollectionDataContract.cs
- HtmlListAdapter.cs
- AsnEncodedData.cs
- CFStream.cs
- NGCSerializationManagerAsync.cs
- RecognizedPhrase.cs
- FixedSOMLineRanges.cs
- CharacterMetricsDictionary.cs
- ConditionalAttribute.cs
- DecoderFallbackWithFailureFlag.cs
- DetailsViewDesigner.cs
- SchemaTableOptionalColumn.cs
- listitem.cs
- SqlServer2KCompatibilityCheck.cs
- ElementHostAutomationPeer.cs
- Stackframe.cs
- BitmapSourceSafeMILHandle.cs
- ExtensibleClassFactory.cs
- ProxyAttribute.cs
- AssociationTypeEmitter.cs
- VScrollBar.cs
- RuleConditionDialog.Designer.cs
- StylusPoint.cs
- DocComment.cs
- RowUpdatedEventArgs.cs
- DataErrorValidationRule.cs
- UserPreferenceChangingEventArgs.cs
- SrgsItemList.cs
- Crypto.cs
- complextypematerializer.cs
- CommandConverter.cs
- DBAsyncResult.cs
- ActivityCodeDomSerializer.cs
- SubstitutionList.cs
- CompiledRegexRunner.cs
- HandlerFactoryCache.cs
- XPathChildIterator.cs
- InputQueue.cs
- Accessors.cs
- GlyphingCache.cs
- UInt64Converter.cs
- TextBox.cs
- invalidudtexception.cs
- WebBrowser.cs
- LineProperties.cs
- ExpressionCopier.cs
- GAC.cs
- WebPartConnection.cs
- TokenBasedSetEnumerator.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- TreeNodeBindingCollection.cs
- FixedDocumentPaginator.cs
- SQlBooleanStorage.cs
- Label.cs
- SendKeys.cs
- GridViewDeletedEventArgs.cs
- AccessDataSource.cs
- PageParserFilter.cs
- XMLSyntaxException.cs
- TextBox.cs
- ResXBuildProvider.cs
- PrefixQName.cs
- ListViewDeletedEventArgs.cs
- TypeSystemHelpers.cs
- Point4DValueSerializer.cs
- TemplateParser.cs
- ReferenceCountedObject.cs
- QueueProcessor.cs
- QueryCursorEventArgs.cs
- TextEditorMouse.cs
- DbDeleteCommandTree.cs
- ParameterRefs.cs
- ObjectAnimationBase.cs
- SQLDecimalStorage.cs
- SrgsGrammar.cs
- PagedDataSource.cs
- CreateUserErrorEventArgs.cs
- ClassData.cs
- HijriCalendar.cs
- figurelength.cs
- FileDialog.cs
- SerialPinChanges.cs
- OptimalTextSource.cs
- CheckBox.cs
- CustomErrorsSection.cs
- PropertyEntry.cs
- RuleElement.cs
- DataGridViewRowHeaderCell.cs
- CapabilitiesSection.cs
- DateBoldEvent.cs
- WmlValidationSummaryAdapter.cs
- RootBuilder.cs
- ToolStripGrip.cs
- InvalidFilterCriteriaException.cs
- XPathNavigatorKeyComparer.cs
- ListViewUpdatedEventArgs.cs
- CompilerWrapper.cs
- GuidelineCollection.cs
- FactoryId.cs