Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Security / Cryptography / PKCS1MaskGenerationMethod.cs / 1305376 / 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 // [System.Security.SecuritySafeCritical] // auto-generated 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MediaSystem.cs
- SignedInfo.cs
- Stroke2.cs
- SHA512Cng.cs
- CmsInterop.cs
- ResourceWriter.cs
- CatalogPartChrome.cs
- TCEAdapterGenerator.cs
- ObservableCollection.cs
- TemplateNameScope.cs
- Lease.cs
- shaper.cs
- ListViewPagedDataSource.cs
- QilNode.cs
- PrinterUnitConvert.cs
- OperationAbortedException.cs
- XamlFxTrace.cs
- QilParameter.cs
- IconBitmapDecoder.cs
- TextRange.cs
- ModifierKeysConverter.cs
- WebRequestModuleElementCollection.cs
- COSERVERINFO.cs
- DataGridViewDataConnection.cs
- lengthconverter.cs
- FieldDescriptor.cs
- XsdValidatingReader.cs
- MachineSettingsSection.cs
- MissingMethodException.cs
- TextAdaptor.cs
- XPathCompileException.cs
- WebControl.cs
- ArrangedElement.cs
- TargetConverter.cs
- SchemaInfo.cs
- HttpInputStream.cs
- StrokeCollectionConverter.cs
- FlowDocumentView.cs
- ReachDocumentPageSerializer.cs
- AuthenticationModuleElement.cs
- ReflectionServiceProvider.cs
- SQLByteStorage.cs
- EnumMember.cs
- XmlNodeChangedEventManager.cs
- DataGridViewCheckBoxCell.cs
- FixedPosition.cs
- SqlBulkCopyColumnMappingCollection.cs
- CompilerTypeWithParams.cs
- QuaternionAnimationBase.cs
- CodeCatchClause.cs
- ModelToObjectValueConverter.cs
- XmlNamespaceManager.cs
- VisualStateGroup.cs
- PageCodeDomTreeGenerator.cs
- MethodBuilder.cs
- SymmetricAlgorithm.cs
- DataGridViewCellCancelEventArgs.cs
- WebConfigurationHostFileChange.cs
- PropertyValueUIItem.cs
- InteropEnvironment.cs
- WindowsTab.cs
- ProfessionalColors.cs
- ProxyElement.cs
- Configuration.cs
- XPathPatternBuilder.cs
- oledbmetadatacolumnnames.cs
- FormsAuthenticationEventArgs.cs
- DragCompletedEventArgs.cs
- HighContrastHelper.cs
- MdiWindowListStrip.cs
- ArgumentNullException.cs
- TreeChangeInfo.cs
- TypeGeneratedEventArgs.cs
- CodeObject.cs
- AnnotationStore.cs
- EventLogConfiguration.cs
- TreeNodeBindingCollection.cs
- SmtpNtlmAuthenticationModule.cs
- JsonEnumDataContract.cs
- DependencyPropertyKind.cs
- Regex.cs
- IgnoreFlushAndCloseStream.cs
- GrammarBuilderPhrase.cs
- XPathNodeInfoAtom.cs
- FixUp.cs
- FontStretch.cs
- SqlInternalConnection.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- OrderedEnumerableRowCollection.cs
- Calendar.cs
- DependencyPropertyKey.cs
- RectAnimation.cs
- DataBindingCollectionEditor.cs
- RemoteWebConfigurationHostStream.cs
- CultureInfoConverter.cs
- UICuesEvent.cs
- pingexception.cs
- DesignerEditorPartChrome.cs
- ProfileProvider.cs
- XmlSchemaImport.cs