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
- PropertySegmentSerializer.cs
- SmtpFailedRecipientsException.cs
- ChangeToolStripParentVerb.cs
- ScrollProperties.cs
- XmlSchemaIdentityConstraint.cs
- DesignerActionVerbList.cs
- BaseCodeDomTreeGenerator.cs
- WinCategoryAttribute.cs
- ReliableRequestSessionChannel.cs
- DesignerAttribute.cs
- SafeThreadHandle.cs
- StaticFileHandler.cs
- CompoundFileReference.cs
- CapabilitiesState.cs
- PropertyStore.cs
- SqlTypesSchemaImporter.cs
- BindingExpressionBase.cs
- InputBinding.cs
- DelegatedStream.cs
- EntryWrittenEventArgs.cs
- Rotation3D.cs
- DetailsViewAutoFormat.cs
- DataGridTextBoxColumn.cs
- RegionInfo.cs
- StateRuntime.cs
- ConfigurationLocationCollection.cs
- PropertyGridCommands.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- DataBoundControl.cs
- CleanUpVirtualizedItemEventArgs.cs
- SrgsGrammarCompiler.cs
- CodeFieldReferenceExpression.cs
- FixedTextView.cs
- SafeFileHandle.cs
- InvalidComObjectException.cs
- DBNull.cs
- ByteAnimation.cs
- KnownTypesProvider.cs
- TemplateAction.cs
- TitleStyle.cs
- InstanceCollisionException.cs
- CompatibleIComparer.cs
- GridErrorDlg.cs
- RecipientServiceModelSecurityTokenRequirement.cs
- WebPartEditorApplyVerb.cs
- WebPartVerbsEventArgs.cs
- CacheOutputQuery.cs
- HierarchicalDataSourceControl.cs
- MetadataSource.cs
- ProvidersHelper.cs
- PropertyOverridesDialog.cs
- ReflectionUtil.cs
- Int32Converter.cs
- DataGridViewSortCompareEventArgs.cs
- ConfigurationPropertyAttribute.cs
- EntitySqlQueryBuilder.cs
- AsyncStreamReader.cs
- SurrogateChar.cs
- MessageSmuggler.cs
- ClientCredentialsSecurityTokenManager.cs
- JsonSerializer.cs
- XmlILConstructAnalyzer.cs
- TypeGeneratedEventArgs.cs
- PageCodeDomTreeGenerator.cs
- TrustLevelCollection.cs
- ContractMapping.cs
- SqlBulkCopyColumnMapping.cs
- SoapIgnoreAttribute.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- SrgsDocumentParser.cs
- OutputCacheProfile.cs
- Int16Animation.cs
- UnmanagedMemoryStreamWrapper.cs
- EnumBuilder.cs
- ElementInit.cs
- PauseStoryboard.cs
- SessionStateItemCollection.cs
- EntityContainer.cs
- MemberRelationshipService.cs
- SqlExpressionNullability.cs
- OfTypeExpression.cs
- PolyQuadraticBezierSegment.cs
- _emptywebproxy.cs
- BinaryNode.cs
- PartialArray.cs
- SqlDataSourceCache.cs
- NamedElement.cs
- DataGridViewCellConverter.cs
- WinCategoryAttribute.cs
- HijriCalendar.cs
- ParseHttpDate.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- CounterSetInstance.cs
- MulticastIPAddressInformationCollection.cs
- GeneratedCodeAttribute.cs
- Stream.cs
- SymmetricKey.cs
- TypeDescriptionProvider.cs
- DefaultValueTypeConverter.cs
- MenuEventArgs.cs