| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >>>>> "Bryan" == Bryan Hoover <bhoover@xxxxxxxx> writes: >> I like the idea of having a byte-oriented class underlying Password >> (which then just adds char support). `SecureData' might be a >> misnomer too, however ;) I mean, we don't want to imply that >> storing data into this class secures it in any meaningful >> way. `SensitiveData' might be a better name. Bryan> Which would seem to imply simply moving the byte oriented stuff Bryan> presently in Password, to SensitiveData (which, as indicated, Bryan> I've, preliminarily at lease, done). Bryan> Though this presents a slight design problem in terms of what Bryan> to do with Password construction from byte[] -- that is, if Bryan> SensitiveData encapsulates byte[], and Password encapsulates Bryan> char[], *and* byte[] versions of Password, which of these two Bryan> classes handles Password's byte[] password to char[] password Bryan> conversion? Eeek! Password would handle conversions. It would have to; SensitiveData would be nothing more than a wrapper around a byte array it doesn't have knowledge about anything else. Bryan> Perhaps a simpler more natural approach than that implied above Bryan> (I'm thinking, Password byte[] constructor passthroughs to Bryan> super, SensitiveData -- though this may indeed be the most Bryan> natural approach) will present itself upon taking a step back Bryan> (from my unicode foray, brain damage :)), but that's the way I Bryan> see it right now. Bryan> The more I think about it, the more comfortable I am with Bryan> Password byte[] constructor passthroughs -- it's still a bit Bryan> like, 'man, what a lot of constructors!' -- I'd just have to Bryan> add the passthrough constructors, and a utf-8 to char[] Bryan> conversion routine to complete the implementation. Bryan> Also, may as well move the char[] to byte[], byte[] to char[] Bryan> into a separate unicode oriented class also. Since Password Bryan> would be tied to SensitiveData by inheritence, may as well be Bryan> encapsulated by SensitiveData, but public (protected?) so Bryan> Password could use the byte[] to char[] conversion. Bryan> What do you think? It would probably be better to use java.nio.charset to convert between bytes and characters. It's available in GNU Classpath, and would make generalizing the conversion to any charset easier. - -- Casey Marshall || csm@xxxxxxx -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/> iD8DBQFAnrhngAuWMgRGsWsRApXAAJ9uAkyfRLxuQhltF4TKzDvUOFyw1wCghtji l9q4eYNzRKnJZgCPtPv/GbY= =emPt -----END PGP SIGNATURE----- _______________________________________________ gnu-crypto-discuss mailing list gnu-crypto-discuss@xxxxxxx http://mail.nongnu.org/mailman/listinfo/gnu-crypto-discuss
[Home] [Gnu Classpath] [Linux Kernel] [Linux Cryptography] [Fedora] [Fedora Directory] [Red Hat Development] [Red Hat 9 Bible] [Fedora Bible] [Red Hat 9] [Network Security Reading]
![]() |