pike.git / src / post_modules / Nettle / nettle.cmod

version» Context lines:

pike.git/src/post_modules/Nettle/nettle.cmod:359:    */      /*! @decl int(0..) rsa_unpad(string(0..255) data, int(1..2) type)    *!    *! Unpads a message that has been padded according to    *! RSAES-PKCS1-V1_5-ENCODE(message) in PKCS#1 v2.2, but without the    *! null byte prefix. The padding method used on the original message    *! must be provided in the @[type] parameter. All content dependent    *! processing is done in constant time for the same padding type and    *! @[data] length. +  *! +  *! @returns +  *! Returns the position in the string where the first non-padding +  *! character is, or 0.    */ - PIKEFUN int rsa_unpad(string(0..255) data, int type) + PIKEFUN int(0..) rsa_unpad(string(0..255) data, int type)   {    int i, pad=0, nonpad=0, pos=0;    unsigned char *str;       NO_WIDE_STRING(data);       /* Indata is smaller than minimum size, so we can exit immediately    without timing issue. 1 type + 8 padding + 1 delimiter + 1 value    = 11 bytes. */    if(data->len < 11 ) RETURN 0;