pike.git / lib / modules / Crypto.pmod / RSA.pike

version» Context lines:

pike.git/lib/modules/Crypto.pmod/RSA.pike:243: Inside #if constant(Gmp) && constant(Gmp.mpz) && constant(Crypto.Hash)
  //! Verify PKCS-1 signature @[sign] of message @[msg] using hash   //! algorithm @[h].   int(0..1) verify(string msg, .Hash h, Gmp.mpz sign)   {    string s = Standards.PKCS.Signature.build_digestinfo(msg, h);    return raw_verify(s, sign);   }      //! Verify PKCS-1 signature @[sign] of message @[msg] using hash   //! algorithm @[h]. - int(0..1) pkcs_verify(string msg, .Hash h, Gmp.mpz sign) + int(0..1) pkcs_verify(string msg, .Hash h, string sign)   {    if (sizeof(sign) != size) return 0; -  return verify(msg, h, sign); +  return verify(msg, h, Gmp.mpz(sign, 256));   }      //! @fixme   //! Document this function.   string sha_sign(string message, mixed|void r)   {    string s = Crypto.SHA1->hash(message);    s = sprintf("%c%s%c%s", 4, "sha1", sizeof(s), s);    return cooked_sign(s);r;   }