Code:
/ DotNET / DotNET / 8.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
- MethodExpression.cs
- TableItemStyle.cs
- RawStylusInputReport.cs
- SettingsPropertyIsReadOnlyException.cs
- IMembershipProvider.cs
- AttributeEmitter.cs
- ProtocolsConfigurationHandler.cs
- TextEditorCopyPaste.cs
- OleDbConnectionInternal.cs
- _ContextAwareResult.cs
- SoapExtensionTypeElement.cs
- StylusPlugInCollection.cs
- EntityRecordInfo.cs
- ResourcesGenerator.cs
- CodeVariableReferenceExpression.cs
- WinFormsComponentEditor.cs
- XmlSchemaObject.cs
- CodeAssignStatement.cs
- TemplateBuilder.cs
- DataGridViewColumnTypePicker.cs
- OrderedDictionary.cs
- SchemaElementLookUpTableEnumerator.cs
- SingleAnimationBase.cs
- DocComment.cs
- LocalValueEnumerator.cs
- ListView.cs
- TableDetailsRow.cs
- HttpRuntime.cs
- OleDbDataAdapter.cs
- SystemInfo.cs
- NamedPipeConnectionPool.cs
- PhysicalFontFamily.cs
- TextEditorDragDrop.cs
- TemplateControlBuildProvider.cs
- Composition.cs
- DBBindings.cs
- ConsumerConnectionPoint.cs
- AttachedPropertyDescriptor.cs
- TypeSystem.cs
- Itemizer.cs
- Triplet.cs
- Material.cs
- ButtonFieldBase.cs
- SweepDirectionValidation.cs
- ObjectContext.cs
- Model3DGroup.cs
- ModifyActivitiesPropertyDescriptor.cs
- StylusEventArgs.cs
- WindowsRebar.cs
- TraceListener.cs
- SerialStream.cs
- SqlDeflator.cs
- PartialTrustHelpers.cs
- ProcessHostConfigUtils.cs
- Point3DAnimationBase.cs
- Sequence.cs
- FamilyCollection.cs
- ReaderWriterLockWrapper.cs
- ProjectedSlot.cs
- PieceDirectory.cs
- CompiledQueryCacheEntry.cs
- OneWayBindingElementImporter.cs
- Point3D.cs
- ReceiveActivityDesignerTheme.cs
- MemberDescriptor.cs
- CollectionsUtil.cs
- EventLogPermissionAttribute.cs
- ConvertersCollection.cs
- CssClassPropertyAttribute.cs
- AnnotationResource.cs
- SoapAttributeOverrides.cs
- DataList.cs
- DesignerAutoFormatCollection.cs
- SpeechDetectedEventArgs.cs
- ToolBarOverflowPanel.cs
- DrawingImage.cs
- DataQuery.cs
- SystemIPv4InterfaceProperties.cs
- EntityAdapter.cs
- WindowsListViewGroup.cs
- ElementAction.cs
- QueryHandler.cs
- RuntimeConfig.cs
- ObjectDataSourceDisposingEventArgs.cs
- ObjectDataSourceChooseTypePanel.cs
- VisualStyleElement.cs
- PrintPreviewDialog.cs
- EventHandlingScope.cs
- RequiredFieldValidator.cs
- DataGridRow.cs
- Comparer.cs
- Zone.cs
- DesignerSerializationVisibilityAttribute.cs
- UnauthorizedWebPart.cs
- ServicePerformanceCounters.cs
- Base64Encoder.cs
- WaitHandleCannotBeOpenedException.cs
- SynchronizationContext.cs
- TextElement.cs
- CustomErrorCollection.cs