- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have successfully tried the IVF Encrypt/Decrypt samples on a character string held in a text file. Both programs take a source file and read the data into a buffer using unformatted READ, filling an integer buffer equal in length toa number of bytes in the file (the buffer is defined as INTEGER(BYTE) and pointed to by a pointer generated using MALLOC). After encryption/decryption, the result is written using unformatted WRITE to a destination text file.
What I am looking for is a way to modify the programs to replace thesource and destination text files by character strings in memory. Can anyone advise me of a way todothis? I am apparentlyforbidden from using internal unformatted READ/WRITES.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Steve, I will try that, which is much simpler than the fudge I found to work, namely:
EQUIVALENCE an INTEGER(1) ISTRING(256) to a CHARACTER(256) STRING
and then fill the INTEGER(1) BUFFER using
ICOUNT=0
....(some other stuff if a key-blob is written...)
DO I=1,LENGTH
ICOUNT=ICOUNT+1
BUFFER(ICOUNT)=ISTRING(I)
END DO
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page