Skip to content
Snippets Groups Projects
Commit c61e6bc2 authored by Niels Möller's avatar Niels Möller
Browse files

*** empty log message ***

Rev: lib/modules/Crypto/pkcs.pmod:1.1
parent 2692607d
No related branches found
No related tags found
No related merge requests found
/* pkcs.pmod
*
* Miscellaneous functions needed for pkcs operation.
*/
/* Construct a PKCS-1 digestinfo */
string build_digestinfo(string msg, object hash)
{
string d = hash->update(msg)->digest();
string id = hash->identifier();
return sprintf("%c%c%c%c%c%c%s%c%c%c%c%s",
0x30, strlen(id) + strlen(d) + 8, 0x30, strlen(id) + 4,
0x06, strlen(id), id, 0x05, 0x00, 0x04, strlen(d), d);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment