|
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. |
On October 13 2014 03:15 darkness wrote:Show nested quote +On October 13 2014 01:33 MinoMoto wrote: Guys I need help in C# I need to create program what checks if password is correct. The problem is that it must check also symbol number // (for example my password is asdfg (5symbols) if i write asd (3symbols) it must write password have 5 symbols) How can I get my program to count symbols? If password is properly encrypted (e.g. MD5), are you even able to tell its length? I thought it was one way process. Of course, I understand if a string is used instead but I'm asking in general.
In a real password system, no one but the person entering the password should know its length.
For this, you could probably send length + encrypted (not sure if encrypted is the right word here) PW when the user enters it, and just store them as a pair.
Of course if the password is stored as plaintext, this is rather easy.
|
Thanks for pointing out the difference between hashing and encrypting a password. I thought they were the same. I mean who uses encryption as in 1:1 mapping anyway?
|
On October 13 2014 01:33 MinoMoto wrote: Guys I need help in C# I need to create program what checks if password is correct. The problem is that it must check also symbol number // (for example my password is asdfg (5symbols) if i write asd (3symbols) it must write password have 5 symbols) How can I get my program to count symbols?
Plain password should be easy. Just use String.Equals to check if they match. If they don't match, you do the comparison of length() and if you want you can even do character-by-character comparison.
If it's an md5 hashed password you'll need to transform everything to byte array and then compare:
using System; using System.Linq;
byte[] hash; byte[] pass = originalPassowrd; string text = passwordToCheck;
using (MD5 md5 = MD5.Create()) { hash = md5.ComputeHash(Encoding.UTF8.GetBytes(text)); }
bool same = hash.SequenceEqual(pass);
And in most cases you'll want your system to save all passwords as the same length so it's not really feasible to check that. But I'm not very good so take all I've written with a pinch of salt
|
On October 12 2014 23:49 ZenithM wrote:Show nested quote +On October 12 2014 15:49 MysteryMeat1 wrote:On October 12 2014 10:34 icystorage wrote: public static void getTotalCharacters() {
while(in.hasNextByte()) { in.hasNextByte(); lengthInCharacters++; }
System.out.println("Total number of characters is: " + lengthInCharacters); }
in.hasNextByte() is being called again in the while loop o_o doesnt that make your program loop forever? doesn't hasnextmethod not move the cursor? Not sure about the double negative there, but HasNext methods don't advance the cursor.
ya thats what i meant, so wouldn't the loop be infinite because its never advancing the cursor?
|
On October 13 2014 04:47 MysteryMeat1 wrote:Show nested quote +On October 12 2014 23:49 ZenithM wrote:On October 12 2014 15:49 MysteryMeat1 wrote:On October 12 2014 10:34 icystorage wrote: public static void getTotalCharacters() {
while(in.hasNextByte()) { in.hasNextByte(); lengthInCharacters++; }
System.out.println("Total number of characters is: " + lengthInCharacters); }
in.hasNextByte() is being called again in the while loop o_o doesnt that make your program loop forever? doesn't hasnextmethod not move the cursor? Not sure about the double negative there, but HasNext methods don't advance the cursor. ya thats what i meant, so wouldn't the loop be infinite because its never advancing the cursor?
It would be, except hasNextByte() returns false. It never even enters the loop so it can't get stuck. It would get stuck in an infinite loop if hasNextByte() returned true as it would never advance like you said.
|
Hyrule19173 Posts
More importantly, never use MD5.
|
|
|
|
|
On October 13 2014 23:28 icystorage wrote: SHA256?
I don't know. Wikipedia says it's discovered by NSA. Wouldn't they leave a backdoor for them considering recent events? #conspiracy
|
|
|
taken your comments on board, i am instead going to look into cloud computing.
"My next idea was to have a look at Cloud Computing as I was advised that many interesting technical challenges exist here. I saw a company hosting online MMO games which conventionally have a download size of 20 gigs that puts a lot of 1st-time users off from bothering to trial them. The cloud hosting of the company allows users to instantly jump into the game without having to download, patch and install it whatsoever. This seems pretty intriguing. "
i'll see what my tutor has to say about it tomorrow. the problem here is that i was supposed to give in a Product Initiation Document last friday which specifies what my project is going to be about, but obviously i have no fucking clue about Cloud Computing so can't specify much!!
i just made a draft title of "An exploration of the benefits and risks of cloud computing with regards to the hosting of large-scale applications" and hope tutor isn't upset at my progress... :/
any comments on this subject? ill make a post maybe later in the week probably after doing some basic research./..
ideally i want to prototype something rather than do 100% research
|
er.... guys did you know gmail just started blocking 7zip (zip) files that contain vbs files? i saved all my work by emailing myself vbs inside 7zip and now all my archived files are deleted by gmail?????????
could have lost a weeks worth of work due to formatting and thinking my files were not going to be randomly fucking DELETED by my email service
edit: ok i lost 2 weeks of work on an older project
EDIT2: ok found a directory backup which has everything on it afaik :D thank ffucking hell for that
EDIT3:
how the fuck does gmail know that my encrypted 7zip file has a .vbs file containing text inside it? does this mean that gmail can check inside zip files for whatever it wants?
|
Gmail and Outlook and all regular email clients will scan all attachments for viruses. If it's a well known file format they can sweep the format for common virus signatures or decompress the file and do the same. I believe it can still do the same to encrypted archive formats but I'm not entirely sure.
http://www.symantec.com/connect/articles/infectable-objects-part-four-viruses-archive-files-and-compressed-files
This problem was quickly overcome by Anti-Virus vendors, who developed software that would decompress files in memory or use algorithms that can decipher the compression without needing to actually expand the file itself. Some can even go as deep as fifty layers inside an archive file.
Specifically when you attach a file in Gmail, Gmail's terms and conditions explicitly state that they can do fuck all with the uploaded contents and your email content because all attached files are uploaded through Gdrive. So it's natural that they also collect all the text information they can find in your uploaded files. Outlook is a bit less invasive.
|
could you briefly explain why zip encryption doesn't prevent them accessing the encrypted files? i mean, does winzip and 7zip work with google to allow google access? i checked the "encrypt file names" button in 7zip so it wasn't a case of google seeing that there was a .vbs file , and it didn't flag the file unless it had text content within the .vbs file (didn't flag an empty .vbs file)
|
Are you talking about encryption or compression? Zip doesn't provide encryption, it's a compression format.
Highly unlikely that WinZIP talks to Google. 7zip definitely doesn't. Google doesn't care about your filenames or .vbs or .cs or .txt, they only care about what's inside the file. It's easy to decompress a file and check whether the bytes inside are ASCII characters that form words.
Not sure if that's relevant to you or not.
--
edit: Never actually worked with .vbs files but apparently they're executable script files like .exe or .py so probably Google determined they could be malicious and deleted them.
|
Canada8032 Posts
On October 14 2014 04:15 FFGenerations wrote: taken your comments on board, i am instead going to look into cloud computing.
"My next idea was to have a look at Cloud Computing as I was advised that many interesting technical challenges exist here. I saw a company hosting online MMO games which conventionally have a download size of 20 gigs that puts a lot of 1st-time users off from bothering to trial them. The cloud hosting of the company allows users to instantly jump into the game without having to download, patch and install it whatsoever. This seems pretty intriguing. "
i'll see what my tutor has to say about it tomorrow. the problem here is that i was supposed to give in a Product Initiation Document last friday which specifies what my project is going to be about, but obviously i have no fucking clue about Cloud Computing so can't specify much!!
i just made a draft title of "An exploration of the benefits and risks of cloud computing with regards to the hosting of large-scale applications" and hope tutor isn't upset at my progress... :/
any comments on this subject? ill make a post maybe later in the week probably after doing some basic research./..
ideally i want to prototype something rather than do 100% research Just be very, very aware that you only have a year to complete this project. Cloud computing by itself can be an extremely vague topic, so above all, make sure that your project scale is reasonable. It's very easy to bite off more than you can chew.
My suggestion would be to boil the idea of cloud computing down to "make a shitty computer run something by offloading the expensive operations to a good computer". This will make it waaay easier to prototype things since you won't have to rent a server or anything.
You could try something like making a game run on a phone through streaming. The initial challenges would be to send video to the phone, receive input from the phone, and to keep everything low latency. Depending on your familiarity with all of this stuff, this may take a while. Just pick a really simple game (or tech demo, for that matter). The logical followup to this (time allowing, of course) would be to start using caching and/or prediction to further lower latency. I suspect that streaming and getting input will take up all of your time though.
There's a recent paper from Microsoft on a potential low-latency solution for cloud gaming which you might find interesting: http://research.microsoft.com/apps/pubs/default.aspx?id=226843
|
On October 14 2014 06:59 Spazer wrote:Show nested quote +On October 14 2014 04:15 FFGenerations wrote: taken your comments on board, i am instead going to look into cloud computing.
"My next idea was to have a look at Cloud Computing as I was advised that many interesting technical challenges exist here. I saw a company hosting online MMO games which conventionally have a download size of 20 gigs that puts a lot of 1st-time users off from bothering to trial them. The cloud hosting of the company allows users to instantly jump into the game without having to download, patch and install it whatsoever. This seems pretty intriguing. "
i'll see what my tutor has to say about it tomorrow. the problem here is that i was supposed to give in a Product Initiation Document last friday which specifies what my project is going to be about, but obviously i have no fucking clue about Cloud Computing so can't specify much!!
i just made a draft title of "An exploration of the benefits and risks of cloud computing with regards to the hosting of large-scale applications" and hope tutor isn't upset at my progress... :/
any comments on this subject? ill make a post maybe later in the week probably after doing some basic research./..
ideally i want to prototype something rather than do 100% research Just be very, very aware that you only have a year to complete this project. Cloud computing by itself can be an extremely vague topic, so above all, make sure that your project scale is reasonable. It's very easy to bite off more than you can chew.
It reminds me of a story I heard last year at university. One of lecturers has accepted a student proposed project for a game (I think one like Doom), and then you may guess - the project hasn't got completed on time.
|
Canada8032 Posts
It's a common story. Almost happened to me too. It's just so damn easy to have too big of a scope.
|
Yeah, and I think it's useless to try too hard for a project simply because your university may own your piece of work after that. Mine does that. Not many people come up with Facebook/Linux level projects but still..
|
On October 14 2014 07:25 darkness wrote:Show nested quote +On October 14 2014 06:59 Spazer wrote:On October 14 2014 04:15 FFGenerations wrote: taken your comments on board, i am instead going to look into cloud computing.
"My next idea was to have a look at Cloud Computing as I was advised that many interesting technical challenges exist here. I saw a company hosting online MMO games which conventionally have a download size of 20 gigs that puts a lot of 1st-time users off from bothering to trial them. The cloud hosting of the company allows users to instantly jump into the game without having to download, patch and install it whatsoever. This seems pretty intriguing. "
i'll see what my tutor has to say about it tomorrow. the problem here is that i was supposed to give in a Product Initiation Document last friday which specifies what my project is going to be about, but obviously i have no fucking clue about Cloud Computing so can't specify much!!
i just made a draft title of "An exploration of the benefits and risks of cloud computing with regards to the hosting of large-scale applications" and hope tutor isn't upset at my progress... :/
any comments on this subject? ill make a post maybe later in the week probably after doing some basic research./..
ideally i want to prototype something rather than do 100% research Just be very, very aware that you only have a year to complete this project. Cloud computing by itself can be an extremely vague topic, so above all, make sure that your project scale is reasonable. It's very easy to bite off more than you can chew. It reminds me of a story I heard last year at university. One of lecturers has accepted a student proposed project for a game (I think one like Doom), and then you may guess - the project hasn't got completed on time. gotta have proper estimates
|
|
|
|
|
|