• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PGP - Eliminating Temp Files?

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been following the tutorial at: http://cephas.net/blog/2004/04/01/pgp-encryption-using-bouncy-castle/.

Following this example, I have been able to encrypt files in PGP. The problem is, I just want a few strings that I can then pass along -- I don't need an encrypted file. The strings will be passed in a web query.

Is there a way to only encrypt Strings and not have to first write them to a file? Does the file encryption have to happen? (I'm struggling to find anything to make me believe otherwise,but that just doesn't make sense to me).

thanks
 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have not looked at the example in detail but just use any of the memory-based alternatives, for example for a Writer you can use a CharArrayWriter or StringWriter instead of a FileWriter. Similiarly for Readers, InputStreams, etc.
 
Chad Step
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Greg, will do that today and see what I come up with.

The current solution creates 3 files, I think this will eliminate at least two of them.
 
We find this kind of rampant individuality very disturbing. But not this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic