On 03/29/2012 11:24 AM, Daniel Shahaf wrote:
> Apache subversion Wiki wrote on Thu, Mar 29, 2012 at 14:07:49 -0000:
>> + PREFIX_LEN=4
>> + 
>> + def encrypt(PLAINTEXT, MP):
>> +     PREFIX = generate_random(PREFIX_LEN)
>> +     PREFIXED_PLAINTEXT_LEN = PREFIX_LEN + len(PLAINTEXT)
>> +     if PREFIXED_PLAINTEXT_LEN % 16:
>> +         PAD = NUL . generate_random(15 - PREFIXED_PLAINTEXT_LEN)
> 
> generate_random(15 - (PREFIXED_PLAINTEXT_LEN % 16))

Yup!  Good catch.

-- 
C. Michael Pilato <cmpil...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to