|
There is this good article [^] about steganography in midi files. You may ask the author to provide you UML diagrams and documentation (or license, who knows...). I suppose you are ready to pay for that.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
project stegnography for data hiding in midi
songs is excellent.
please send which algorithm it is used ,how key is working.please send
UML Diagrams and documentation of this project.
Thanking you
|
|
|
|
|
Hmm...looks like you are packing your bags to reach moon.
Sit down with your teacher/ team members/ clients, analyze the requirements,get the documents done and then start to work on it. You can always use Google in the process. It's for Free!!
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
modified on Tuesday, April 28, 2009 1:20 AM
|
|
|
|
|
Hi guys,
I'm a little to new to SOAP Services but am having an issue trying to access a soap service by a third party vendor.
There service name is 'get-info' but when I import the WSDL into VS2008 it gets rid of the '-' so then service name becomes invalid. I asked them to change it but they said that due to their policies and other contractual restrictions, they won't.
I have got around it with a WebRequest/Response, but really want to get the this working.
Any help would be appreciated.
|
|
|
|
|
Hi,
What is differnece between Method Overlaoding and Method overriding in C#.net .Is that true overriding only allows in Inheritance ?
Best Regards
Rameez
|
|
|
|
|
Method Overloading
==================
It is possible to define the same function twice while using different parameters for each definition.
A same named function is defined more than once in your program resulting an overloading of function.
Method Overriding
=================
A class may override an inherited virtual method by declaring a method with the same name and signature, and marking the declaration with the override modifier.
override modifier replaces the inherited implementation of the method.
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
Any beginners' book will explain that.
|
|
|
|
|
Thanks for reply ,
One more question Method overriding only possible in Inheritance or we can also use it in Polymorphisim ?
Best Regards
|
|
|
|
|
Hello,
I'm trying to create a chart generator where random numbers define the chart coordinates.
As new values are added on the chart, the scrollbar appears and then scrolls automatically, pointing to the end of the chart, so the user can see the last data inserted.
The problem is that I'm inserting new values on the picturebox's image but after the scroll exceeds the original picturebox's size, it start repeating the image, instead of displaying the new values - it becomes just like a repeating scene on loop. I don't know what I can in order to solve that, I'd like to have the new values displayed on the image as the scroll continues.
The source code is below (sorry, but I don't know how to place it formatted here...):
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Drawing.Imaging;
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
private const int WM_SCROLL = 276;
private const int WM_VSCROLL = 277;
private const int SB_LINEUP = 0;
private const int SB_LINELEFT = 0;
private const int SB_LINEDOWN = 1;
private const int SB_LINERIGHT = 1;
private const int SB_PAGEUP = 2;
private const int SB_PAGELEFT = 2;
private const int SB_PAGEDOWN = 3;
private const int SB_PAGERIGTH = 3;
private const int SB_PAGETOP = 6;
private const int SB_LEFT = 6;
private const int SB_PAGEBOTTOM = 7;
private const int SB_RIGHT = 7;
private const int SB_ENDSCROLL = 8;
[DllImport("user32.dll", CharSet = CharSet.Auto)]
private static extern int SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam);
List<point> pointList = new List<point>();
Graphics graphics;
Pen pen;
Random random = new Random();
int current = 0;
Point oldPoint = new Point();
Point newPoint = new Point();
Color bgColor;
Bitmap newBitmap;
public Form1()
{
InitializeComponent();
bgColor = Color.White;
pen = new Pen(Color.Black);
newBitmap = new Bitmap(pbChart.Width, pbChart.Height, PixelFormat.Format24bppRgb);
graphics = Graphics.FromImage(newBitmap);
graphics.Clear(bgColor);
graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
}
void drawPoint(int px, int py)
{
newPoint.X = px;
newPoint.Y = py;
if (pointList.Count != 0)
{
oldPoint = pointList.Last();
}
else
{
oldPoint = newPoint;
}
pointList.Clear();
pointList.Add(oldPoint);
pointList.Add(newPoint);
if (px > pbChart.Width)
{
pbChart.Width += (px - pbChart.Width);
SendMessage(panel1.Handle, WM_SCROLL, (IntPtr)SB_RIGHT, IntPtr.Zero);
}
graphics.DrawCurve(pen, pointList.ToArray());
pbChart.BackgroundImage = newBitmap;
pbChart.Refresh();
}
private void timer1_Tick(object sender, EventArgs e)
{
drawPoint(current, random.Next(0, pbChart.Height));
current += 5;
}
private void btnPlayPause_Click(object sender, EventArgs e)
{
if (timer1.Enabled)
timer1.Stop();
else
timer1.Start();
}
}
}</point></point>
I guess that after the width is increased, the graphics width keeps the old one, so it does not show the new values, but I don't know how to overcome that, if that is the root cause of the problem.
Thanks in advance,
Regards,
Caio.
|
|
|
|
|
Dear,
I have one panel and set its BackgroundImage as Image1. When I use mouse over the panel, I want to see panel changes to Image2 and when I move mouse away from the panel, it shows the defualt image (Image1).
What I am going to do?
Thanks,
Visoth
|
|
|
|
|
private void panel1_MouseEnter(object sender, EventArgs e)
{
panel1.BackgroundImage = ...
}
private void panel1_MouseLeave(object sender, EventArgs e)
{
panel1.BackgroundImage = ...
{
A simple google search would of gave you the answer to this.
|
|
|
|
|
Firstly, I would like to thanks for your respond. When I mouse enter, it changes the backgroupimage but not the same image that I want it to show. The second thing is when i leave mouse away, it still catch the image that i use mouse enter.
Please see my code below:
private void panel5_MouseEnter(object sender, EventArgs e)
{
this.panel5.BackgroundImage = imageList1.Images["Selection Bar Selected.bmp"];
}
private void panel5_MouseLeave(object sender, EventArgs e)
{
this.panel5.BackgroundImage = imageList1.Images["Selection Bar Unselected.bmp"];
}
Thanks
|
|
|
|
|
misCafe wrote: private void panel5_MouseEnter(object sender, EventArgs e)
{
this.panel5.BackgroundImage = imageList1.Images["Selection Bar Selected.bmp"];
}
private void panel5_MouseLeave(object sender, EventArgs e)
{
this.panel5.BackgroundImage = imageList1.Images["Selection Bar Unselected.bmp"];
}
This code should work according what you want. Double check the image list, and other code might affect the changes.
*12Code
|
|
|
|
|
Alright, I'll double check it again.
Thanks so much bro!
Visoth
|
|
|
|
|
I'm creating a CustomGridView based (of course) on the GridView.
I'm writen my on PagerProperties with a diferent class and diferent properties.
Everything works ok with the default values but if I set any value I receive the "Ambiguous Match Found" error.
Here is a sample code of what is happening:
public sealed class MyPagerSettings : IStateManager {
...
[Category("Appearance")]
[DefaultValue(true)]
[NotifyParentProperty(true)]
public bool Visible {
get { return (bool?)mViewState["Visible"] ?? true; }
set { mViewState["Visible"] = value; }
}
...
}
public class MyGridView : GridView {
...
MyPagerSettings mPagerSettings;
[Category("Paging")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[NotifyParentProperty(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
<code>new</code> public virtual MyPagerSettings PagerSettings {
get {
if (mPagerSettings == null) {
mPagerSettings = new MyPagerSettings(this);
if (IsTrackingViewState)
((IStateManager)mPagerSettings).TrackViewState();
}
return mPagerSettings;
}
}
...
}
The new modifier should hide the base property.
On the consuming page:
<awc:MyGridView ID="MyGridView1" runat="server" AllowPaging="True" PageSize="10">
<code><PagerSettings Visible=false /> <-- The error happens here!</code>
<Columns>
...
</Columns>
</awc:MyGridView>
Please any help on how to work around it?
Please... I don't want to change the name of the property!!! So no obvious answers please.
Thanks.
|
|
|
|
|
Hi....i am doing chat application.I want to do multilingual application.If a user currently chatting in English and if he selects German then all text should effected into German language.
please help me.
Thanks.
|
|
|
|
|
|
Hello,
How to write simple com service in C# ?
I don't mean just com visible interface - i mean really com service that will start up when the machine will start up automatic and every component could use this component interface as a Com.
|
|
|
|
|
Please refere the MSDN com-service articles.
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
Hi,
I am currently developing a client/server application which consists of a "root/master" server, some "normal" servers and some clients.
I want the "root/master" server and the "normal" servers to be securely identified and i want to encrypt traffic between "root/master" server,
"normal" server and clients using Ssl encryption.
Minimum system requirements for servers should be win server 2003 and for clients winXP. (Currently I use win server 2008 for "root/master" server as I got the certificate management working only with the new Certificate Enrollment API)
That's why I need:
- One certificate for the "root/master" server
- One certificate for each "normal" server
- One certificate for each client
-> The certificates of the "root/master" server and the "normal" servers have to be signed by a CA so that I can verify the identity of the servers.
-> The "root/master" server should serve as CA.
This is what I did:
- Create certificate for "root/master" server manually on windows server 2008.
- Imported this certificate manually on the "normal" servers and clients computers.
The "normal" servers and clients can now connect to the "root/master" server using SslStream and identify it.
------------------------------------------------------------------
To get the certificates for the "normal" servers I wanted them to send a certificate request to the "root/master" server.
Then the "root/master" server issues the request and sends certificate back.
I don't want the "normal" server admin to do that. It should automatically be done by the "normal" server when first connecting to the
"root/master" server.
This is what I did:
"Normal" server
...connects to "root/master" server using sslstream and identifies "root/master" server
...sends CommonName for certificate creation
"Root/Master" server (using Certificate Enrollment API)
...creates certificate request
...sends certificate request
...issues certificate request
...get issued certificate and sends it back to "normal" server
Next connection
"Normal" server
...uses issued certificate to "authenticate as client"
-> Problem:
-> The "normal" server does not found the private key for the issued certificate.
-> I looked at the certificate and it has no private key attached. So something went wrong during the certification creation on the "root/master" server.
Has somebody an idea what went wrong during certificate creation?
Is there a general "error" in the process which I designed to let the "normal" servers get their certificates?
------------------------------------------------------------------
Code:
"normal" server
<code>
byte[] cert = this.ReadBytes();
CertManager.CreateCert(cert);
X509Certificate certClient = new X509Certificate2(@"C:\newcert.cer");
</code>
"root/master" Server handling
<code>
String certRequest = CertManagerVista.CreateRequest("CoordClient11");
CertRequest requestObj = CertManagerVista.SendRequest(certRequest);
CertManagerVista.Issue(requestObj);
String cert = CertManagerVista.GetRequestStatus(requestObj);
// cert to bytes
char[] chars = cert.ToCharArray();
int count = chars.Length;
byte[] bytes = new byte[count];
for (int i = 0; i < count; i++)
{
bytes[i] = BitConverter.GetBytes(chars[i])[0];
}
// Send cert
this.SendBytes(bytes);
</code>
CertManagerVista.cs
<code>
static public String CreateRequest(String cn)
{
// Create all the objects that will be required
CX509CertificateRequestPkcs10 objPkcs10 = new CX509CertificateRequestPkcs10Class();
CX509PrivateKey objPrivateKey = new CX509PrivateKeyClass();
CCspInformation objCSP = new CCspInformationClass();
CCspInformations objCSPs = new CCspInformationsClass();
CX500DistinguishedName objDN = new CX500DistinguishedNameClass();
CX509Enrollment objEnroll = new CX509EnrollmentClass();
CObjectIds objObjectIds = new CObjectIdsClass();
CObjectId objObjectId = new CObjectIdClass();
CX509ExtensionKeyUsage objExtensionKeyUsage = new CX509ExtensionKeyUsageClass();
CX509ExtensionEnhancedKeyUsage objX509ExtensionEnhancedKeyUsage = new CX509ExtensionEnhancedKeyUsageClass();
String strRequest = "";
privateKey = "";
try
{
// Initialize the csp object using the desired Cryptograhic Service Provider (CSP)
objCSP.InitializeFromName(
"Microsoft Enhanced Cryptographic Provider v1.0"
);
// Add this CSP object to the CSP collection object
objCSPs.Add(objCSP);
// Provide key container name, key length and key spec to the private key object
//objPrivateKey.ContainerName = "AlejaCMa";
objPrivateKey.Length = 1024;
objPrivateKey.KeySpec = X509KeySpec.XCN_AT_SIGNATURE;
objPrivateKey.KeyUsage = X509PrivateKeyUsageFlags.XCN_NCRYPT_ALLOW_ALL_USAGES;
objPrivateKey.MachineContext = false;
// Provide the CSP collection object (in this case containing only 1 CSP object)
// to the private key object
objPrivateKey.CspInformations = objCSPs;
// Create the actual key pair
objPrivateKey.Create();
//privateKey = objPrivateKey.Export("PRIVATEBLOB", EncodingType.XCN_CRYPT_STRING_BASE64); // did not work
// Initialize the PKCS#10 certificate request object based on the private key.
// Using the context, indicate that this is a user certificate request and don't
// provide a template name
objPkcs10.InitializeFromPrivateKey(
X509CertificateEnrollmentContext.ContextUser,
objPrivateKey,
""
);
// Key Usage Extension
objExtensionKeyUsage.InitializeEncode(
X509KeyUsageFlags.XCN_CERT_DIGITAL_SIGNATURE_KEY_USAGE |
X509KeyUsageFlags.XCN_CERT_NON_REPUDIATION_KEY_USAGE |
X509KeyUsageFlags.XCN_CERT_KEY_ENCIPHERMENT_KEY_USAGE |
X509KeyUsageFlags.XCN_CERT_DATA_ENCIPHERMENT_KEY_USAGE
);
objPkcs10.X509Extensions.Add((CX509Extension)objExtensionKeyUsage);
// Enhanced Key Usage Extension
objObjectId.InitializeFromValue("1.3.6.1.5.5.7.3.2"); // OID for Client Authentication usage
objObjectIds.Add(objObjectId);
objX509ExtensionEnhancedKeyUsage.InitializeEncode(objObjectIds);
objPkcs10.X509Extensions.Add((CX509Extension)objX509ExtensionEnhancedKeyUsage);
// Encode the name in using the Distinguished Name object
objDN.Encode(
"CN=" + cn,
X500NameFlags.XCN_CERT_NAME_STR_NONE
);
// Assing the subject name by using the Distinguished Name object initialized above
objPkcs10.Subject = objDN;
// Create enrollment request
objEnroll.InitializeFromRequest(objPkcs10);
strRequest = objEnroll.CreateRequest(
EncodingType.XCN_CRYPT_STRING_BASE64
);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return strRequest;
}
static public CertRequest SendRequest(String request)
{
// Create all the objects that will be required
CCertConfig objCertConfig = new CCertConfigClass();
CCertRequest objCertRequest = new CCertRequestClass();
string strCAConfig;
string strRequest;
int iDisposition;
string strDisposition;
try
{
strRequest = request;
// Get CA config from UI
strCAConfig = objCertConfig.GetConfig(CC_DEFAULTCONFIG);
//strCAConfig = objCertConfig.GetConfig(CC_UIPICKCONFIG);
// Submit the request
iDisposition = objCertRequest.Submit(
CR_IN_BASE64 | CR_IN_FORMATANY,
strRequest,
null,
strCAConfig
);
// Check the submission status
if (CR_DISP_ISSUED != iDisposition) // Not enrolled
{
strDisposition = objCertRequest.GetDispositionMessage();
if (CR_DISP_UNDER_SUBMISSION == iDisposition) // Pending
{
Console.WriteLine("The submission is pending: " + strDisposition);
return new CertRequest(objCertRequest);
}
else // Failed
{
Console.WriteLine("The submission failed: " + strDisposition);
Console.WriteLine("Last status: " + objCertRequest.GetLastStatus().ToString());
return new CertRequest(objCertRequest);
}
}
//// Get the certificate
//strCert = objCertRequest.GetCertificate(
// CR_OUT_BASE64 | CR_OUT_CHAIN
//);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return new CertRequest(objCertRequest);
}
static public String GetRequestStatus(CertRequest certRequest)
{
CCertRequest objCertRequest = certRequest.request;
CCertConfig objCertConfig = new CCertConfigClass();
String strCAConfig = objCertConfig.GetConfig(CC_DEFAULTCONFIG);
// Refresh the request, since is has now the 'Issued' status
int numDisposition = objCertRequest.RetrievePending(objCertRequest.GetRequestId(), strCAConfig); // Replaced strConfig with ""
// Get the certificate
String certStr = objCertRequest.GetCertificate(CR_OUT_BASE64HEADER);
return certStr;
}
static public void Issue(CertRequest request)
{
CCertAdmin objAdmin = new CCertAdminClass();
CCertConfig objCertConfig = new CCertConfigClass();
String strCAConfig = objCertConfig.GetConfig(CC_DEFAULTCONFIG);
int requestId = request.request.GetRequestId();
// Now issue the request
int numDisposition = objAdmin.ResubmitRequest(strCAConfig, requestId);
}
static public void AcceptPKCS7(String cert)
{
// Create all the objects that will be required
CX509Enrollment objEnroll = new CX509EnrollmentClass();
string strCert;
try
{
strCert = cert;
// Install the certificate
objEnroll.Initialize(X509CertificateEnrollmentContext.ContextUser);
objEnroll.InstallResponse(
InstallResponseRestrictionFlags.AllowUntrustedRoot,
strCert,
EncodingType.XCN_CRYPT_STRING_BASE64,
null
);
Console.WriteLine("Certificate installed!");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
</code>
CertManager.cs
<code>
static public void CreateCert(byte[] data)
{
X509Certificate2 c = new X509Certificate2(data);
FileStream fs = new FileStream(@"C:\newcert.cer", FileMode.Create);
fs.Write(data, 0, data.Length);
fs.Close();
}
</code>
|
|
|
|
|
|
hi guyz i am working on an application of ftp. my application successfully connects to the remote server. the trouble i am dealing with is when i press any key to go(jump) to a specific file my application hangs, but after some time it resumes, i have used key_press_evevt to but not able to getting the logic behind that. so see if any one be able to do it.
|
|
|
|
|
post your code in key_press event
|
|
|
|
|
i do but still not working
|
|
|
|
|
hello there!
i want to save string to file in binary method with C#
it dosent work. 4 example i want to save the string "Hello World" to "myFile.bin" and if i edit this file with notepad i will get this result
וכJ†Ynה’F\$חieֻׁ¥\%ֲ־§
anyone can help with code !!!
|
|
|
|