Robert Meek wrote: > Actually I am using NET and the algorithms I'm trying to use are > those provided by the clr.
I think you're confusing the Common Language Runtime with the .Net Framework class library. The class library is what provides algorithms and classes. The CLR just provides a run-time environment -- memory manager, security enforcement, exception handling, etc. The .Net Framework's stream classes aren't as convenient as Delphi's. You paid for Delphi; you may as well use what it provides. > It seems to have available just about anything > I > might need except as I said they all work with a MemoryStream and byte > variables. I tried typecasting but that didn't seem to work and I don't > know if I can substitute a different stream type...but I'll give it a try > and see what happens. One thing though, it seems a terrible waste to use > a > stream just for a single string of perhaps 8 chars, but I haven't had any > luck finding any specific string handling encryption routines...good > ones...that can be used in NET except for paid libraries. On the introductory help page for MemoryStream, there is an example that takes a string and puts it onto a stream. It uses the UnicodeEncoding class to convert strings into byte arrays, and then it writes those arrays to a stream. Any string-encrypting function you find will have to convert the string into a byte representation, do numeric operations on those bytes, and then possibly convert the bytes back into some kind of string representation. If you find that it makes any difference, maybe you keep the UnicodeEncoding and MemoryStream instances available for repeated uses of your encryption function to avoid having to create them anew each time. -- Rob _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

