Florian Weimer <[EMAIL PROTECTED]> writes: >I'm trying to implement an encryption layer using PerlIO (in C, not >using PerlIO::via). Is it correct that I shouldn't provide yet another >line discipline like PerlIO::encoding, but a completely new lowest layer (like >the "unix" layer) which happens to use another file handle in its >implementation? After all, the encryption layer is completely opaque as >far as line translation, buffering etc. are concerned, and there doesn't >seem to be a more direct way to encode this in the PerlIO abstraction.
You could add encryption with an encoding-like layer. Depending on what you are trying to do and your security concerns it may make sense to have it as a low level lay (below buffering). I don't see why it has to replace :unix layer though - it could go just above.