comp.lang.ada
 help / color / mirror / Atom feed
* Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
@ 2013-09-04 11:10 Austin Obyrne
  2013-09-04 19:37 ` Austin Obyrne
  2013-09-05  3:16 ` Dennis Lee Bieber
  0 siblings, 2 replies; 19+ messages in thread
From: Austin Obyrne @ 2013-09-04 11:10 UTC (permalink / raw)


My present method of encrypting a file of plaintext is to open it in the AdaGIDE editor – SAVE it under a filename and then call it for encryption and subsequent test decryption.

1)I can key in a file of plaintext for encryption directly to the editor and save it from there or,

2)I can prepare a file of plaintext for encryption in Word say and copy ‘n paste that into the editor also and then save that file into the main folder for calling from there for encryption.

Question: Is it necessary to always go through the editor as I am doing or am I wrong there also.

Question: Can I call a file for encryption from *anywhere in my computer by declaring the full path to the Ada-95 compiler?

If so how much information must I give as the path – an example of a path would be greatly appreciated like say the file is in ‘My Documents’ – what would the ‘path’ look like’.

Your help would again be appreciated.

You have solved my other problem re attaching ciphertext files to emails – many, many thanks.

Up to now I thought a file of plaintext for encryption always has to go through the AdGide editor for the compiler to 'see' it - True or false.

Not very bright with navigating my way around I’m afraid.

adacrypt

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-04 11:10 Calling a File for Encryption from outside of the Main Ada-95 Holding Folder Austin Obyrne
@ 2013-09-04 19:37 ` Austin Obyrne
  2013-09-04 19:47   ` Eryndlia Mavourneen
  2013-09-05  3:16 ` Dennis Lee Bieber
  1 sibling, 1 reply; 19+ messages in thread
From: Austin Obyrne @ 2013-09-04 19:37 UTC (permalink / raw)


On Wednesday, September 4, 2013 12:10:13 PM UTC+1, Austin Obyrne wrote:
> My present method of encrypting a file of plaintext is to open it in the AdaGIDE editor – SAVE it under a filename and then call it for encryption and subsequent test decryption. 1)I can key in a file of plaintext for encryption directly to the editor and save it from there or, 2)I can prepare a file of plaintext for encryption in Word say and copy ‘n paste that into the editor also and then save that file into the main folder for calling from there for encryption. Question: Is it necessary to always go through the editor as I am doing or am I wrong there also. Question: Can I call a file for encryption from *anywhere in my computer by declaring the full path to the Ada-95 compiler? If so how much information must I give as the path – an example of a path would be greatly appreciated like say the file is in ‘My Documents’ – what would the ‘path’ look like’. Your help would again be appreciated. You have solved my other problem re attaching ciphertext files to emails – many, many thanks. Up to now I thought a file of plaintext for encryption always has to go through the AdGide editor for the compiler to 'see' it - True or false. Not very bright with navigating my way around I’m afraid. adacrypt

I’m writing a ‘userguide’ for some encryption software that I will be promoting soon and would like to tell users all of the options that may be available on how to submit a file of plaintext for encryption by the software.

My preferred method is to open the file of plaintext initially in a word processor for formatting and then copy ‘n paste that file into the AdaGIDE editor for saving into the main folder from where it can be called for encryption into ciphertext by the Ada-95 program.

I would like to be able to say that any file elsewhere on the computer can be called directly also without going through this intermediate step of passing through the editor but I am not sure if that can be done and if so what is the exact instruction to key in to tell the program where to go to find it.

I think there is a long ‘path’ to be defined to the encryption program on where to go to fetch the file of plaintext.

Any help would be greatly appreciated – even a guess would help.

adacrypt

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-04 19:37 ` Austin Obyrne
@ 2013-09-04 19:47   ` Eryndlia Mavourneen
  2013-09-04 20:23     ` Austin Obyrne
  2013-09-04 20:37     ` Austin Obyrne
  0 siblings, 2 replies; 19+ messages in thread
From: Eryndlia Mavourneen @ 2013-09-04 19:47 UTC (permalink / raw)


On Wednesday, September 4, 2013 2:37:45 PM UTC-5, Austin Obyrne wrote:
> On Wednesday, September 4, 2013 12:10:13 PM UTC+1, Austin Obyrne wrote:
> . . .
> I’m writing a ‘userguide’ for some encryption software that I will be promoting soon and would like to tell users all of the options that may be available on how to submit a file of plaintext for encryption by the software.
> 
> My preferred method is to open the file of plaintext initially in a word processor for formatting and then copy ‘n paste that file into the AdaGIDE editor for saving into the main folder from where it can be called for encryption into ciphertext by the Ada-95 program.
> . . .
> Any help would be greatly appreciated – even a guess would help.
>
> adacrypt

I'm not quite following why you need to save it (the word-processed document?) to a file and then copy the (unformatted?) text to another editor (AdaGIDE?) for encryption.  Why can you not encrypt the formatted, word-processed file directly?  Isn't this what the receiver would prefer?

-- Eryndlia Mavourneen (KK1T)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-04 19:47   ` Eryndlia Mavourneen
@ 2013-09-04 20:23     ` Austin Obyrne
  2013-09-04 20:37     ` Austin Obyrne
  1 sibling, 0 replies; 19+ messages in thread
From: Austin Obyrne @ 2013-09-04 20:23 UTC (permalink / raw)


On Wednesday, September 4, 2013 8:47:54 PM UTC+1, Eryndlia Mavourneen wrote:
> On Wednesday, September 4, 2013 2:37:45 PM UTC-5, Austin Obyrne wrote: > On Wednesday, September 4, 2013 12:10:13 PM UTC+1, Austin Obyrne wrote: > . . . > I’m writing a ‘userguide’ for some encryption software that I will be promoting soon and would like to tell users all of the options that may be available on how to submit a file of plaintext for encryption by the software. > > My preferred method is to open the file of plaintext initially in a word processor for formatting and then copy ‘n paste that file into the AdaGIDE editor for saving into the main folder from where it can be called for encryption into ciphertext by the Ada-95 program. > . . . > Any help would be greatly appreciated – even a guess would help. > > adacrypt I'm not quite following why you need to save it (the word-processed document?) to a file and then copy the (unformatted?) text to another editor (AdaGIDE?) for encryption. Why can you not encrypt the formatted, word-processed file directly? Isn't this what the receiver would prefer? -- Eryndlia Mavourneen (KK1T)

I cannot copy files directly into the main Ada folder (Just tried it again)- it seems to be a procedural routine that must be followed i.e. you go into the folder only via the adaGIDE editor only - this is what I am not sure about - I think I can send files to it?.

Also, a person intimated a long time ago (foreget the details) that it is possible to call a file of plaintext for encryption from any part of the computer but you must stake out the full formal path - I have no experience of doing that and thought perhaps readers might.

Thanks - Austin.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-04 19:47   ` Eryndlia Mavourneen
  2013-09-04 20:23     ` Austin Obyrne
@ 2013-09-04 20:37     ` Austin Obyrne
  2013-09-04 21:31       ` Austin Obyrne
  1 sibling, 1 reply; 19+ messages in thread
From: Austin Obyrne @ 2013-09-04 20:37 UTC (permalink / raw)


On Wednesday, September 4, 2013 8:47:54 PM UTC+1, Eryndlia Mavourneen wrote:
> On Wednesday, September 4, 2013 2:37:45 PM UTC-5, Austin Obyrne wrote: > On Wednesday, September 4, 2013 12:10:13 PM UTC+1, Austin Obyrne wrote: > . . . > I’m writing a ‘userguide’ for some encryption software that I will be promoting soon and would like to tell users all of the options that may be available on how to submit a file of plaintext for encryption by the software. > > My preferred method is to open the file of plaintext initially in a word processor for formatting and then copy ‘n paste that file into the AdaGIDE editor for saving into the main folder from where it can be called for encryption into ciphertext by the Ada-95 program. > . . . > Any help would be greatly appreciated – even a guess would help. > > adacrypt I'm not quite following why you need to save it (the word-processed document?) to a file and then copy the (unformatted?) text to another editor (AdaGIDE?) for encryption. Why can you not encrypt the formatted, word-processed file directly? Isn't this what the receiver would prefer? -- Eryndlia Mavourneen (KK1T)

I think I will just say in the usergude what I have been doing during the development work which is to create a file in a wordprocessor, format it, copy 'n paste it into the AdaGIDE editor, save it there where it will appear in the main folder and open for encryption when I need it.  This is sure fire and works very nicely. If users want to do something else then so be it.

I would like to be more au fait with it all though for my general peace of mind.

Still welcoming suggestions.

Is it right for me to think that the AdaGIDE editor and compiler are not amenable to files created in other software being copied in directly?? what say you O' Scribe.

adacrypt

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-04 20:37     ` Austin Obyrne
@ 2013-09-04 21:31       ` Austin Obyrne
  2013-09-05  5:39         ` Simon Wright
  2013-09-05 14:40         ` Eryndlia Mavourneen
  0 siblings, 2 replies; 19+ messages in thread
From: Austin Obyrne @ 2013-09-04 21:31 UTC (permalink / raw)


On Wednesday, September 4, 2013 9:37:30 PM UTC+1, Austin Obyrne wrote:
> On Wednesday, September 4, 2013 8:47:54 PM UTC+1, Eryndlia Mavourneen wrote: > On Wednesday, September 4, 2013 2:37:45 PM UTC-5, Austin Obyrne wrote: > On Wednesday, September 4, 2013 12:10:13 PM UTC+1, Austin Obyrne wrote: > . . . > I’m writing a ‘userguide’ for some encryption software that I will be promoting soon and would like to tell users all of the options that may be available on how to submit a file of plaintext for encryption by the software. > > My preferred method is to open the file of plaintext initially in a word processor for formatting and then copy ‘n paste that file into the AdaGIDE editor for saving into the main folder from where it can be called for encryption into ciphertext by the Ada-95 program. > . . . > Any help would be greatly appreciated – even a guess would help. > > adacrypt I'm not quite following why you need to save it (the word-processed document?) to a file and then copy the (unformatted?) text to another editor (AdaGIDE?) for encryption. Why can you not encrypt the formatted, word-processed file directly? Isn't this what the receiver would prefer? -- Eryndlia Mavourneen (KK1T) I think I will just say in the usergude what I have been doing during the development work which is to create a file in a wordprocessor, format it, copy 'n paste it into the AdaGIDE editor, save it there where it will appear in the main folder and open for encryption when I need it. This is sure fire and works very nicely. If users want to do something else then so be it. I would like to be more au fait with it all though for my general peace of mind. Still welcoming suggestions. Is it right for me to think that the AdaGIDE editor and compiler are not amenable to files created in other software being copied in directly?? what say you O' Scribe. adacrypt

<Is it right for me to think that the AdaGIDE editor and compiler are not <amenable to files created in other software being copied in directly?? what <say you O' Scribe. 

Answering my own question - YES.

It has to go through the AdaGIDE editor to be 'baptised' in Ada - this is sine qua non - it was staring me in the face - clearly a file created in MS Word is not acceptable to an Ada compiler - but the same file is quite acceptable after is has passed through the adaGIDE which is of course ADA and makes it compatible to the compiler - I have just tried a small test file - it raised a 'constraint error' when I try to encrypt it as a word doc but when I pass the same file through the AdaGIDE editor before trying to encrypt it it works fine.

I hope this isn't too boring to you all.

Many thanks anyway.

Austin


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-04 11:10 Calling a File for Encryption from outside of the Main Ada-95 Holding Folder Austin Obyrne
  2013-09-04 19:37 ` Austin Obyrne
@ 2013-09-05  3:16 ` Dennis Lee Bieber
  2013-09-05  6:57   ` Austin Obyrne
  1 sibling, 1 reply; 19+ messages in thread
From: Dennis Lee Bieber @ 2013-09-05  3:16 UTC (permalink / raw)


On Wed, 4 Sep 2013 04:10:13 -0700 (PDT), Austin Obyrne
<austin.obyrne@hotmail.com> declaimed the following:

	I'm going to snip a lot of this and get to one point...
>Up to now I thought a file of plaintext for encryption always has to go through the AdGide editor for the compiler to 'see' it - True or false.
>

	The "compiler" NEVER sees the plaintext...

	The compiler is used to "compile" the source code of the encryption
/program/ into an executable.

	The executable program is what has to see the plaintext as input, and
produce some other file as the encrypted output.

	The simplest way is probably to use stdin and stdout via command line
redirection (a feature of the operating system, not of the
language/compiler). If the "key" is a compiled in constant, this would mean
using a command line on the form of:

	encrypt <plain.txt >cypher.txt

	The next step above would be to use the language features to access the
command line arguments. That would let one enter a "key" on the command
line, along with the file names

	encrypt    thisISaK3y	plain.txt	cypher.txt

	Note how none of the above is sensitive to the language -- Python, Ada,
C/++, Java ALL react the same way.

You'll forgive if I don't take the time to actually code an example -- it's
going on 2330 hours and I need to go to work in the morning...
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-04 21:31       ` Austin Obyrne
@ 2013-09-05  5:39         ` Simon Wright
  2013-09-05  7:16           ` Austin Obyrne
  2013-09-05  7:56           ` Austin Obyrne
  2013-09-05 14:40         ` Eryndlia Mavourneen
  1 sibling, 2 replies; 19+ messages in thread
From: Simon Wright @ 2013-09-05  5:39 UTC (permalink / raw)


Austin Obyrne <austin.obyrne@hotmail.com> writes:

> On Wednesday, September 4, 2013 9:37:30 PM UTC+1, Austin Obyrne wrote:

> <Is it right for me to think that the AdaGIDE editor and compiler are
> not <amenable to files created in other software being copied in
> directly?? what <say you O' Scribe.
>
> Answering my own question - YES.
>
> It has to go through the AdaGIDE editor to be 'baptised' in Ada - this
> is sine qua non - it was staring me in the face - clearly a file
> created in MS Word is not acceptable to an Ada compiler - but the same
> file is quite acceptable after is has passed through the adaGIDE which
> is of course ADA and makes it compatible to the compiler - I have just
> tried a small test file - it raised a 'constraint error' when I try to
> encrypt it as a word doc but when I pass the same file through the
> AdaGIDE editor before trying to encrypt it it works fine.

A .doc or .docx file is not a text file; it contains all sorts of binary
data.

I created example.docx containing just the text "Hello, world.". It came
out as nearly 4 kb and is in fact a zip archive:

$ unzip -l example.docx
Archive:  example.docx
  Length     Date   Time    Name
 --------    ----   ----    ----
      573  09-05-13 05:29   _rels/.rels
      531  09-05-13 05:29   word/_rels/document.xml.rels
      208  09-05-13 05:29   word/settings.xml
      845  09-05-13 05:29   word/document.xml
     1903  09-05-13 05:29   word/styles.xml
      595  09-05-13 05:29   word/fontTable.xml
      379  09-05-13 05:29   docProps/app.xml
      476  09-05-13 05:29   docProps/core.xml
     1118  09-05-13 05:29   [Content_Types].xml
 --------                   -------
     6628                   9 files

Files like this shouldn't be opened with Ada.Text_IO.

I bet that if you create your plaintext using Notepad (maybe even
Wordpad) you wouldn't need to go through AdaGIDE to create a file that
your program *can* open.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-05  3:16 ` Dennis Lee Bieber
@ 2013-09-05  6:57   ` Austin Obyrne
  0 siblings, 0 replies; 19+ messages in thread
From: Austin Obyrne @ 2013-09-05  6:57 UTC (permalink / raw)


On Thursday, September 5, 2013 4:16:17 AM UTC+1, Dennis Lee Bieber wrote:
> On Wed, 4 Sep 2013 04:10:13 -0700 (PDT), Austin Obyrne <austin.obyrne@hotmail.com> declaimed the following: I'm going to snip a lot of this and get to one point... >Up to now I thought a file of plaintext for encryption always has to go through the AdGide editor for the compiler to 'see' it - True or false. > The "compiler" NEVER sees the plaintext... The compiler is used to "compile" the source code of the encryption /program/ into an executable. The executable program is what has to see the plaintext as input, and produce some other file as the encrypted output. The simplest way is probably to use stdin and stdout via command line redirection (a feature of the operating system, not of the language/compiler). If the "key" is a compiled in constant, this would mean using a command line on the form of: encrypt <plain.txt >cypher.txt The next step above would be to use the language features to access the command line arguments. That would let one enter a "key" on the command line, along with the file names encrypt thisISaK3y plain.txt cypher.txt Note how none of the above is sensitive to the language -- Python, Ada, C/++, Java ALL react the same way. You'll forgive if I don't take the time to actually code an example -- it's going on 2330 hours and I need to go to work in the morning... -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/

Many thanks again Dennis.  I think I have solved the problem from a UserGuide perspective by putting the text file throght the adaGIDE editor - it seems to 'ratify' it as being an Ada compatible workpiece and does the trick - most users won't know anything about Ada so this ritual will be acceptable to them.

It slays me when I have to go through diverse interfaces like command lines etc - a huge amount of work has gone into the crypto side of things and I'm afraid I am running out of steam at my age (80 next Christmas).

Thanks once more for everything - I think I can say problem solved.

Austin.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-05  5:39         ` Simon Wright
@ 2013-09-05  7:16           ` Austin Obyrne
  2013-09-05  7:56           ` Austin Obyrne
  1 sibling, 0 replies; 19+ messages in thread
From: Austin Obyrne @ 2013-09-05  7:16 UTC (permalink / raw)


On Thursday, September 5, 2013 6:39:23 AM UTC+1, Simon Wright wrote:
> Austin Obyrne <austin.obyrne@hotmail.com> writes: > On Wednesday, September 4, 2013 9:37:30 PM UTC+1, Austin Obyrne wrote: > <Is it right for me to think that the AdaGIDE editor and compiler are > not <amenable to files created in other software being copied in > directly?? what <say you O' Scribe. > > Answering my own question - YES. > > It has to go through the AdaGIDE editor to be 'baptised' in Ada - this > is sine qua non - it was staring me in the face - clearly a file > created in MS Word is not acceptable to an Ada compiler - but the same > file is quite acceptable after is has passed through the adaGIDE which > is of course ADA and makes it compatible to the compiler - I have just > tried a small test file - it raised a 'constraint error' when I try to > encrypt it as a word doc but when I pass the same file through the > AdaGIDE editor before trying to encrypt it it works fine. A .doc or .docx file is not a text file; it contains all sorts of binary data. I created example.docx containing just the text "Hello, world.". It came out as nearly 4 kb and is in fact a zip archive: $ unzip -l example.docx Archive: example.docx Length Date Time Name -------- ---- ---- ---- 573 09-05-13 05:29 _rels/.rels 531 09-05-13 05:29 word/_rels/document.xml.rels 208 09-05-13 05:29 word/settings.xml 845 09-05-13 05:29 word/document.xml 1903 09-05-13 05:29 word/styles.xml 595 09-05-13 05:29 word/fontTable.xml 379 09-05-13 05:29 docProps/app.xml 476 09-05-13 05:29 docProps/core.xml 1118 09-05-13 05:29 [Content_Types].xml -------- ------- 6628 9 files Files like this shouldn't be opened with Ada.Text_IO. I bet that if you create your plaintext using Notepad (maybe even Wordpad) you wouldn't need to go through AdaGIDE to create a file that your program *can* open.

Hi Simon,

I have just tried doing that in NotePad and it sailed through - I wrote this short passage -"The rain Spain is maily in the plains." - effortless encryption -

Many thanks to you and everybody for this great help - I think you will appreciate how important it is to go public and being totally confident - this is new cryptography and it is a world first in vector based cipher design - I am very pleased it is in Ada also - This puts me in the driving saet with total confidernce now i.e. knowing what answers to give users who may ask.

Cheers - Austin


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-05  5:39         ` Simon Wright
  2013-09-05  7:16           ` Austin Obyrne
@ 2013-09-05  7:56           ` Austin Obyrne
  2013-09-05 11:33             ` Simon Wright
  1 sibling, 1 reply; 19+ messages in thread
From: Austin Obyrne @ 2013-09-05  7:56 UTC (permalink / raw)


On Thursday, September 5, 2013 6:39:23 AM UTC+1, Simon Wright wrote:
> Austin Obyrne <austin.obyrne@hotmail.com> writes: > On Wednesday, September 4, 2013 9:37:30 PM UTC+1, Austin Obyrne wrote: > <Is it right for me to think that the AdaGIDE editor and compiler are > not <amenable to files created in other software being copied in > directly?? what <say you O' Scribe. > > Answering my own question - YES. > > It has to go through the AdaGIDE editor to be 'baptised' in Ada - this > is sine qua non - it was staring me in the face - clearly a file > created in MS Word is not acceptable to an Ada compiler - but the same > file is quite acceptable after is has passed through the adaGIDE which > is of course ADA and makes it compatible to the compiler - I have just > tried a small test file - it raised a 'constraint error' when I try to > encrypt it as a word doc but when I pass the same file through the > AdaGIDE editor before trying to encrypt it it works fine. A .doc or .docx file is not a text file; it contains all sorts of binary data. I created example.docx containing just the text "Hello, world.". It came out as nearly 4 kb and is in fact a zip archive: $ unzip -l example.docx Archive: example.docx Length Date Time Name -------- ---- ---- ---- 573 09-05-13 05:29 _rels/.rels 531 09-05-13 05:29 word/_rels/document.xml.rels 208 09-05-13 05:29 word/settings.xml 845 09-05-13 05:29 word/document.xml 1903 09-05-13 05:29 word/styles.xml 595 09-05-13 05:29 word/fontTable.xml 379 09-05-13 05:29 docProps/app.xml 476 09-05-13 05:29 docProps/core.xml 1118 09-05-13 05:29 [Content_Types].xml -------- ------- 6628 9 files Files like this shouldn't be opened with Ada.Text_IO. I bet that if you create your plaintext using Notepad (maybe even Wordpad) you wouldn't need to go through AdaGIDE to create a file that your program *can* open.

I have tried Word Pad also and iit works equally well - but as you say the file extension .doc is taboo - must not be used - .dat is fine

Summarising.

Users can use 'Notepad' with .dat file extension say
Users can use 'Wordpad' with .dat file extension

If users insist on using MS Word then it must go through the AdaGIDE editor with a .dat file extension (if any).

Thanks again - Austin


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-05  7:56           ` Austin Obyrne
@ 2013-09-05 11:33             ` Simon Wright
  2013-09-05 15:46               ` Austin Obyrne
  2013-09-05 16:00               ` Austin Obyrne
  0 siblings, 2 replies; 19+ messages in thread
From: Simon Wright @ 2013-09-05 11:33 UTC (permalink / raw)


Austin Obyrne <austin.obyrne@hotmail.com> writes:

> I have tried Word Pad also and iit works equally well - but as you say
> the file extension .doc is taboo - must not be used - .dat is fine

It's not the file extension, it's the contents of the file! (I realise
that many people would have trouble making the distinction).

> Summarising.
>
> Users can use 'Notepad' with .dat file extension say
> Users can use 'Wordpad' with .dat file extension

It would be more normal to use .txt

> If users insist on using MS Word then it must go through the AdaGIDE
> editor with a .dat file extension (if any).

Or Notepad, or Wordpad .. what you are doing is Copying the contents of
the Word document, and Pasting them into an editor which doesn't
understand Word's style and format information and only accepts the raw
characters. Which is all that you are interested in.

I don't think it's entirely reasonable from your users' point of view to
only be able to deal with plain text files, though; for example, what
about images? (.jpg, etc) which are going to give you the same
problem. Perhaps you could consider reading the files using
Ada.Streams.Stream_IO?

Example use in procedure Output_Contents starting at line 182 of
http://goo.gl/wcqkop


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-04 21:31       ` Austin Obyrne
  2013-09-05  5:39         ` Simon Wright
@ 2013-09-05 14:40         ` Eryndlia Mavourneen
  2013-09-05 15:38           ` Austin Obyrne
  1 sibling, 1 reply; 19+ messages in thread
From: Eryndlia Mavourneen @ 2013-09-05 14:40 UTC (permalink / raw)


On Wednesday, September 4, 2013 9:37:30 PM UTC+1, Austin Obyrne wrote:
> 
> . . .
> It has to go through the AdaGIDE editor to be 'baptised' in Ada - this is sine qua non - it was staring me in the face - clearly a file created in MS Word is not acceptable to an Ada compiler - but the same file is quite acceptable after is has passed through the adaGIDE which is of course ADA and makes it compatible to the compiler - I have just tried a small test file - it raised a 'constraint error' when I try to encrypt it as a word doc but when I pass the same file through the AdaGIDE editor before trying to encrypt it it works fine.
> . . .
>
> Austin

Every word processing program I have seen allows you to save the text only (*.txt), eliminating all the (binary) formatting codes.  Typically, the menu allows a "Save As..." option, which you would use to accomplish this.  Normally there is a field at the bottom of the window which allows you to select the format of the output file.  In this case, of course, you want "text" or "*.txt".

-- Eryndlia Mavourneen (KK1T)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-05 14:40         ` Eryndlia Mavourneen
@ 2013-09-05 15:38           ` Austin Obyrne
  0 siblings, 0 replies; 19+ messages in thread
From: Austin Obyrne @ 2013-09-05 15:38 UTC (permalink / raw)


On Thursday, September 5, 2013 3:40:09 PM UTC+1, Eryndlia Mavourneen wrote:
> On Wednesday, September 4, 2013 9:37:30 PM UTC+1, Austin Obyrne wrote: > > . . . > It has to go through the AdaGIDE editor to be 'baptised' in Ada - this is sine qua non - it was staring me in the face - clearly a file created in MS Word is not acceptable to an Ada compiler - but the same file is quite acceptable after is has passed through the adaGIDE which is of course ADA and makes it compatible to the compiler - I have just tried a small test file - it raised a 'constraint error' when I try to encrypt it as a word doc but when I pass the same file through the AdaGIDE editor before trying to encrypt it it works fine. > . . . > > Austin Every word processing program I have seen allows you to save the text only (*.txt), eliminating all the (binary) formatting codes. Typically, the menu allows a "Save As..." option, which you would use to accomplish this. Normally there is a field at the bottom of the window which allows you to select the format of the output file. In this case, of course, you want "text" or "*.txt". -- Eryndlia Mavourneen (KK1T)

Brilliant!

This is the solution !!!!

I have tried using the .txt file extension now when I save from MS Word and it owrks atreat - it enables me to go ahead and encrypt.

This is what Iv'e always wanted all along.

I never before took any notice of that options menu at the bottom - live and learn.

Have you any more advice???

I am truly grateful to you for this invaluable advice.

Many thanks,

Austin



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-05 11:33             ` Simon Wright
@ 2013-09-05 15:46               ` Austin Obyrne
  2013-09-05 16:00               ` Austin Obyrne
  1 sibling, 0 replies; 19+ messages in thread
From: Austin Obyrne @ 2013-09-05 15:46 UTC (permalink / raw)


On Thursday, September 5, 2013 12:33:32 PM UTC+1, Simon Wright wrote:
> Austin Obyrne <austin.obyrne@hotmail.com> writes: > I have tried Word Pad also and iit works equally well - but as you say > the file extension .doc is taboo - must not be used - .dat is fine It's not the file extension, it's the contents of the file! (I realise that many people would have trouble making the distinction). > Summarising. > > Users can use 'Notepad' with .dat file extension say > Users can use 'Wordpad' with .dat file extension It would be more normal to use .txt > If users insist on using MS Word then it must go through the AdaGIDE > editor with a .dat file extension (if any). Or Notepad, or Wordpad .. what you are doing is Copying the contents of the Word document, and Pasting them into an editor which doesn't understand Word's style and format information and only accepts the raw characters. Which is all that you are interested in. I don't think it's entirely reasonable from your users' point of view to only be able to deal with plain text files, though; for example, what about images? (.jpg, etc) which are going to give you the same problem. Perhaps you could consider reading the files using Ada.Streams.Stream_IO? Example use in procedure Output_Contents starting at line 182 of http://goo.gl/wcqkop

Many thanks Simon,

I think I will leave images for the present - just security of information will be all for now - frankly I dont know enough about images yet but anything that can be reduced to an alpahnumeric can be encrypted by my cipher.

Can I come back to you sometime in the future on this one.

Regards - Austinn

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-05 11:33             ` Simon Wright
  2013-09-05 15:46               ` Austin Obyrne
@ 2013-09-05 16:00               ` Austin Obyrne
  2013-09-05 16:08                 ` Eryndlia Mavourneen
  1 sibling, 1 reply; 19+ messages in thread
From: Austin Obyrne @ 2013-09-05 16:00 UTC (permalink / raw)


On Thursday, September 5, 2013 12:33:32 PM UTC+1, Simon Wright wrote:
> Austin Obyrne <austin.obyrne@hotmail.com> writes: > I have tried Word Pad also and iit works equally well - but as you say > the file extension .doc is taboo - must not be used - .dat is fine It's not the file extension, it's the contents of the file! (I realise that many people would have trouble making the distinction). > Summarising. > > Users can use 'Notepad' with .dat file extension say > Users can use 'Wordpad' with .dat file extension It would be more normal to use .txt > If users insist on using MS Word then it must go through the AdaGIDE > editor with a .dat file extension (if any). Or Notepad, or Wordpad .. what you are doing is Copying the contents of the Word document, and Pasting them into an editor which doesn't understand Word's style and format information and only accepts the raw characters. Which is all that you are interested in. I don't think it's entirely reasonable from your users' point of view to only be able to deal with plain text files, though; for example, what about images? (.jpg, etc) which are going to give you the same problem. Perhaps you could consider reading the files using Ada.Streams.Stream_IO? Example use in procedure Output_Contents starting at line 182 of http://goo.gl/wcqkop

Could I take (.txt) for everything as standard in future and not bother with (.dat) even - I would like to be able to imply this as a caveat to my users - what do you say O' Wise One?

AdaGIDE will always accept .txt ???

I would like to use just one rule.

You guys have really sorted things for me - I am truly grateful for your help.

Knowing about the file extensons drop down menu options menu is just marvellous.

Grateful to everybody.

Austin

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-05 16:00               ` Austin Obyrne
@ 2013-09-05 16:08                 ` Eryndlia Mavourneen
  2013-09-05 16:50                   ` Austin Obyrne
  0 siblings, 1 reply; 19+ messages in thread
From: Eryndlia Mavourneen @ 2013-09-05 16:08 UTC (permalink / raw)


On Thursday, September 5, 2013 11:00:16 AM UTC-5, Austin Obyrne wrote:
> 
> Knowing about the file extensons drop down menu options menu is just marvellous.
> . . .

Hi Austin,

The file type (file extension) such as .txt or .ada, etc., is just to specify the content of the file.  Ada files to be processed by a compiler -- or any language files for that matter (that I am aware of) -- are really just text files.  The .ada, .ads, .adb, ..., just identify what the content of the file is and, therefore, what program to use as the *default* program to open them.  Nothing keeps you from opening a .ada file with a text editor like Notepad.

-- Eryndlia Mavourneen (KK1T)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-05 16:08                 ` Eryndlia Mavourneen
@ 2013-09-05 16:50                   ` Austin Obyrne
  2013-09-05 17:42                     ` Eryndlia Mavourneen
  0 siblings, 1 reply; 19+ messages in thread
From: Austin Obyrne @ 2013-09-05 16:50 UTC (permalink / raw)


On Thursday, September 5, 2013 5:08:44 PM UTC+1, Eryndlia Mavourneen wrote:
> On Thursday, September 5, 2013 11:00:16 AM UTC-5, Austin Obyrne wrote: > > Knowing about the file extensons drop down menu options menu is just marvellous. > . . . Hi Austin, The file type (file extension) such as .txt or .ada, etc., is just to specify the content of the file. Ada files to be processed by a compiler -- or any language files for that matter (that I am aware of) -- are really just text files. The .ada, .ads, .adb, ..., just identify what the content of the file is and, therefore, what program to use as the *default* program to open them. Nothing keeps you from opening a .ada file with a text editor like Notepad. -- Eryndlia Mavourneen (KK1T)

Hi Eryndlia,

This opens up a whole new avenue for me to go down in more detail in the future - I mean the implications of file extensions.

For my present purposes I want to try and reduce the scope of file preparations to a few methods.

Using a word processor like MS Word might be the most intuitive to most of my potential users because it is something they are already familiar with and also there is the great liklihood of them wanting to open up older batch files and encrypt this for secure back up storage so that must be number one method.  Even for files being created in realtime it is still number one method now that I know about attaching the (.txt) extension - I can labour that as an essential condition.

Summarising,

I am going to say this is order of selection of preapartion software.

1) Word processor.

2) Wordpad.

3) Notepad.

with the all important stipulation that the files are saved with a (.txt) file extension.

How does that come across to you.

Austin.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Calling a File for Encryption from outside of the Main Ada-95 Holding Folder.
  2013-09-05 16:50                   ` Austin Obyrne
@ 2013-09-05 17:42                     ` Eryndlia Mavourneen
  0 siblings, 0 replies; 19+ messages in thread
From: Eryndlia Mavourneen @ 2013-09-05 17:42 UTC (permalink / raw)


On Thursday, September 5, 2013 11:50:35 AM UTC-5, Austin Obyrne wrote:
> On Thursday, September 5, 2013 5:08:44 PM UTC+1, Eryndlia Mavourneen wrote:
> 
> > On Thursday, September 5, 2013 11:00:16 AM UTC-5, Austin Obyrne wrote: > > Knowing about the file extensons drop down menu options menu is just marvellous. > . . . Hi Austin, The file type (file extension) such as .txt or .ada, etc., is just to specify the content of the file. Ada files to be processed by a compiler -- or any language files for that matter (that I am aware of) -- are really just text files. The .ada, .ads, .adb, ..., just identify what the content of the file is and, therefore, what program to use as the *default* program to open them. Nothing keeps you from opening a .ada file with a text editor like Notepad. -- Eryndlia Mavourneen (KK1T)
> 
> 
> 
> Hi Eryndlia,
> 
> . . .
> Summarising,
> I am going to say this is order of selection of preapartion software.
> 
> 1) Word processor.
> 2) Wordpad.
> 3) Notepad.
> 
> with the all important stipulation that the files are saved with a (.txt) file extension.
> 
> How does that come across to you.
> 
> Austin.

Unless your encryption algorithm is designed to only work with text files, I would think that any file could be encrypted and successfully decrypted on the other end.  That way, the receiver of the file can decrypt it and use whatever form is useful, such as a Word document.  If that person desires a text file, then the Save As... option can be used.

Does this make sense to you?

Btw, if you wish to take any of this offline, since this group is concerned with Ada, please write me directly at eryndlia at gmail dot com.

-- Eryndlia Mavourneen (KK1T)

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2013-09-05 17:42 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-04 11:10 Calling a File for Encryption from outside of the Main Ada-95 Holding Folder Austin Obyrne
2013-09-04 19:37 ` Austin Obyrne
2013-09-04 19:47   ` Eryndlia Mavourneen
2013-09-04 20:23     ` Austin Obyrne
2013-09-04 20:37     ` Austin Obyrne
2013-09-04 21:31       ` Austin Obyrne
2013-09-05  5:39         ` Simon Wright
2013-09-05  7:16           ` Austin Obyrne
2013-09-05  7:56           ` Austin Obyrne
2013-09-05 11:33             ` Simon Wright
2013-09-05 15:46               ` Austin Obyrne
2013-09-05 16:00               ` Austin Obyrne
2013-09-05 16:08                 ` Eryndlia Mavourneen
2013-09-05 16:50                   ` Austin Obyrne
2013-09-05 17:42                     ` Eryndlia Mavourneen
2013-09-05 14:40         ` Eryndlia Mavourneen
2013-09-05 15:38           ` Austin Obyrne
2013-09-05  3:16 ` Dennis Lee Bieber
2013-09-05  6:57   ` Austin Obyrne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox