On 12/09/2010 11:40 AM, Martin Paljak wrote: > Hello, > On Dec 9, 2010, at 9:23 AM, webmas...@opensc-project.org wrote: > >> Revision: 4930 >> Author: s >> Date: 2010-12-09 07:23:10 +0000 (Thu, 09 Dec 2010) >> >> Log Message: >> ----------- >> add to r4904: fix calculating of signature size for CKK_GOSTR3410 >> >> - *pLength *= 2; >> + *pLength = (*pLength + 7) / 8 * 2; > > Could you also add a comment? Why not (*pLength + 7) / 4?
Replying instead of the commit's author. (length + 7) / 8 is a common way to calculate stride width so that the result is aligned to 8. It might be a good idea to give a meaningful name to 2, but please don't simplify the calculation by replacing / 8 * 2 with 4 as it would make it harder to understand. Regards, Kalev _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel