This forum is for Spring Framework questions. I don't think your question is related to Spring. So I am going to move this to the IO forum because you are talking about readers writers.
Please make sure you post in the most appropriate forum about your question. It will ensure you get a quicker more accurate response.
It's not really clear what you are asking. Can you show a couple examples of what you're talking about?
Also, you should be aware that encryption that relies on the enemy not knowing your encryption algorithm is essentially useless. Always assume the enemy knows what algorithm you're using, and use one that is based on a key, whether it's a symmetric encryption or public/private key pair or whatever.
Of course, if this is just for study where the actual encryption isn't the issue and doesn't need to be really secure, then don't worry about that part.
kurt marfori
Greenhorn
Joined: Jan 19, 2012
Posts: 12
posted
0
Jeff Verdegan wrote:Kurt, welcome to the Ranch!
It's not really clear what you are asking. Can you show a couple examples of what you're talking about?
Also, you should be aware that encryption that relies on the enemy not knowing your encryption algorithm is essentially useless. Always assume the enemy knows what algorithm you're using, and use one that is based on a key, whether it's a symmetric encryption or public/private key pair or whatever.
Of course, if this is just for study where the actual encryption isn't the issue and doesn't need to be really secure, then don't worry about that part.
thanks for all your replies ill just post later the problem and my sample output.It's like scrambling of some character.
kurt marfori
Greenhorn
Joined: Jan 19, 2012
Posts: 12
posted
0
Jeff Verdegan wrote:Kurt, welcome to the Ranch!
It's not really clear what you are asking. Can you show a couple examples of what you're talking about?
Also, you should be aware that encryption that relies on the enemy not knowing your encryption algorithm is essentially useless. Always assume the enemy knows what algorithm you're using, and use one that is based on a key, whether it's a symmetric encryption or public/private key pair or whatever.
Of course, if this is just for study where the actual encryption isn't the issue and doesn't need to be really secure, then don't worry about that part.
Thanks Jeff..I'll just post later a couple of examples and the output of the input i've given yesterday..hope you could come up with a code a soon as i state it clearly what really the problem is.
Thanks again
kurt marfori
Greenhorn
Joined: Jan 19, 2012
Posts: 12
posted
0
Mark Spritzler wrote:This forum is for Spring Framework questions. I don't think your question is related to Spring. So I am going to move this to the IO forum because you are talking about readers writers.
Please make sure you post in the most appropriate forum about your question. It will ensure you get a quicker more accurate response.
Thanks
Mark
Thanks for the reply Mark.Sorry for the lack of information that i have posted.I'll just post later some examples and the output of the input i have given and hoping the you could come up with a code. This problem is related to spring.
kurt marfori
Greenhorn
Joined: Jan 19, 2012
Posts: 12
posted
0
Skipping Strings
Description
Sue Spicious likes to communicate with her friends on social network sites, but she knows that these sites aren’t very secure, and she also doesn’t like the way that the sites’ owners tend to assert ownership over all content. Her messages aren’t likely to be of interest to many others, but she’s not interested in having them data-mined by e-commerce companies.
To provide some simple protection against the data-miners, Sue encodes all of her messages through a scrambling procedure, which operates separately on each line of her message. Sue starts with the number 16, the age when she and her friends met, and pulls out every 16th character of the line, placing these characters in order at the beginning of her coded line of text. Then she halves the number, and pulls out every 8th character of the remaining characters of the line. She continues in this way for every 4th character and 2nd character, and then finally adds the remaining characters to the end of her coded line of text.
You are Sue’s friends and you want to help her encode her messages. To do this, you need to write a program to generate an encrypted version of Sues message.
Input Format
The input consists of lines of text from a text file, where each line contains from 1 to 80 characters, and is terminated by a newline ’\n’ character. The input ends with an empty line (newline character only). Each line is a line of Sue’s message.
Output Format
The output consists of the scrambled message, line by line.
Input
0123456789abcdef
This is only a test for you to read.
Sue wouldn’t post the important messages where you can see them.
Even encrypted ones.
• Your program should have a separate method that will extract the letters, encrypt and return the encrypted version of Sue’s message line by line.
• Sues message is in the text file named skipping_input.txt.
• Aside from displaying the encrypted message of Sue in the screen your program is also required to create a backup in a text file named skipping_output.txt.
kurt marfori
Greenhorn
Joined: Jan 19, 2012
Posts: 12
posted
0
kurt marfori wrote:Skipping Strings
Description
Sue Spicious likes to communicate with her friends on social network sites, but she knows that these sites aren’t very secure, and she also doesn’t like the way that the sites’ owners tend to assert ownership over all content. Her messages aren’t likely to be of interest to many others, but she’s not interested in having them data-mined by e-commerce companies.
To provide some simple protection against the data-miners, Sue encodes all of her messages through a scrambling procedure, which operates separately on each line of her message. Sue starts with the number 16, the age when she and her friends met, and pulls out every 16th character of the line, placing these characters in order at the beginning of her coded line of text. Then she halves the number, and pulls out every 8th character of the remaining characters of the line. She continues in this way for every 4th character and 2nd character, and then finally adds the remaining characters to the end of her coded line of text.
You are Sue’s friends and you want to help her encode her messages. To do this, you need to write a program to generate an encrypted version of Sues message.
Input Format
The input consists of lines of text from a text file, where each line contains from 1 to 80 characters, and is terminated by a newline ’\n’ character. The input ends with an empty line (newline character only). Each line is a line of Sue’s message.
Output Format
The output consists of the scrambled message, line by line.
Input
0123456789abcdef
This is only a test for you to read.
Sue wouldn’t post the important messages where you can see them.
Even encrypted ones.
• Your program should have a separate method that will extract the letters, encrypt and return the encrypted version of Sue’s message line by line.
• Sues message is in the text file named skipping_input.txt.
• Aside from displaying the encrypted message of Sue in the screen your program is also required to create a backup in a text file named skipping_output.txt.
This is the correct problem.I find it difficult to solve how am i going to do this..