[FFmpeg-devel] [RFC] Public API for RC4 and DES
Mon Feb 2 18:53:55 CET 2009
On Wed, Jan 28, 2009 at 03:17:27PM +0100, Reimar D?ffinger wrote:
> attached patch makes them use an API similar to AES.
> - src is const
> - alignment requirements of src and dst documented
> - src == NULL is allowed for easier use as PRNG
> - RC4 does not implement CBC (what would be the IV length for RC4?
> Would a one-byte IV even be useful?)
> - block size, relative to which count is given, is 16 bytes for AES,
> 8 bytes for DES and 1 byte for RC4
> The disadvantage for the only user asfcrypt is that it adds two
> malloc/frees per ASF block, at least with the current design.
An unpdated version: the structs themselves are now public,
ff_des_encdec is kept exported (but not part of the public API) so newer
libavutil versions will work with older libavcodec,
and av_des_init now actually makes a sense: it generates the round keys
(sorry, I forgot this could be extracted - it was actually discussed
during the review when this code was added).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7974 bytes
Desc: not available
More information about the ffmpeg-devel