Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Security / Cryptography / PKCS1MaskGenerationMethod.cs / 1 / PKCS1MaskGenerationMethod.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== namespace System.Security.Cryptography { [System.Runtime.InteropServices.ComVisible(true)] public class PKCS1MaskGenerationMethod : MaskGenerationMethod { private String HashNameValue; // // public constructors // public PKCS1MaskGenerationMethod() { HashNameValue = "SHA1"; } // // public properties // public String HashName { get { return HashNameValue; } set { HashNameValue = value; if (HashNameValue == null) { HashNameValue = "SHA1"; } } } // // public methods // public override byte[] GenerateMask(byte[] rgbSeed, int cbReturn) { HashAlgorithm hash = (HashAlgorithm) CryptoConfig.CreateFromName(HashNameValue); byte[] rgbCounter = new byte[4]; byte[] rgbT = new byte[cbReturn]; uint counter = 0; for (int ib=0; ib_hash.Length) { Buffer.BlockCopy(_hash, 0, rgbT, ib, _hash.Length); } else { Buffer.BlockCopy(_hash, 0, rgbT, ib, rgbT.Length - ib); } ib += hash.Hash.Length; } return rgbT; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PrimitiveType.cs
- TemplateInstanceAttribute.cs
- WebPartDisplayModeCancelEventArgs.cs
- BitmapCodecInfoInternal.cs
- CanonicalXml.cs
- LowerCaseStringConverter.cs
- KeyPressEvent.cs
- PasswordRecovery.cs
- UriTemplateCompoundPathSegment.cs
- NullableConverter.cs
- FormsAuthentication.cs
- XmlSchemaInfo.cs
- OracleCommand.cs
- ImmutableCollection.cs
- TreeViewItemAutomationPeer.cs
- CategoryAttribute.cs
- ListenerElementsCollection.cs
- DbMetaDataFactory.cs
- TextStore.cs
- PrtTicket_Public.cs
- SizeF.cs
- PageParser.cs
- SendMailErrorEventArgs.cs
- MDIClient.cs
- IndexedSelectQueryOperator.cs
- ProfilePropertyMetadata.cs
- URL.cs
- CodeCommentStatement.cs
- CustomCredentialPolicy.cs
- DataColumnCollection.cs
- KeyValueSerializer.cs
- CancelEventArgs.cs
- BindableAttribute.cs
- SplineQuaternionKeyFrame.cs
- ReadOnlyPropertyMetadata.cs
- DbMetaDataFactory.cs
- IncomingWebRequestContext.cs
- ToolStripStatusLabel.cs
- StatementContext.cs
- UpdateTranslator.cs
- SevenBitStream.cs
- ResizeGrip.cs
- EntityContainerEntitySet.cs
- ProxyFragment.cs
- EdmError.cs
- GraphicsPathIterator.cs
- Propagator.cs
- ReflectionHelper.cs
- DataGridRowClipboardEventArgs.cs
- StructuredType.cs
- CustomErrorsSectionWrapper.cs
- SystemTcpStatistics.cs
- EventLogSession.cs
- PagesSection.cs
- GridViewCellAutomationPeer.cs
- MethodMessage.cs
- ColumnClickEvent.cs
- PropertyGridEditorPart.cs
- FindCompletedEventArgs.cs
- InProcStateClientManager.cs
- ADMembershipUser.cs
- TextEffect.cs
- EnumerableRowCollection.cs
- EventHandlersDesigner.cs
- ContractListAdapter.cs
- MemoryPressure.cs
- PasswordRecovery.cs
- XmlNamespaceDeclarationsAttribute.cs
- XPathNavigatorReader.cs
- ShimAsPublicXamlType.cs
- CodeConditionStatement.cs
- SecurityManager.cs
- Wizard.cs
- SchemaHelper.cs
- InstanceLockException.cs
- HttpDebugHandler.cs
- PointLight.cs
- SerializationInfo.cs
- DupHandleConnectionReader.cs
- WindowsTokenRoleProvider.cs
- CqlBlock.cs
- DataFormats.cs
- SafeBitVector32.cs
- UnsafeNativeMethods.cs
- basemetadatamappingvisitor.cs
- BuildProviderUtils.cs
- Models.cs
- SafeMILHandle.cs
- DescendantQuery.cs
- SoapSchemaExporter.cs
- HandlerBase.cs
- UserControl.cs
- objectquery_tresulttype.cs
- BulletDecorator.cs
- XPathDocument.cs
- NotImplementedException.cs
- ErrorTableItemStyle.cs
- OrCondition.cs
- messageonlyhwndwrapper.cs
- SecurityHelper.cs