文件名称:产生RSA公钥对-数字签名隐藏
文件大小:2.63MB
文件格式:PPT
更新时间:2024-05-16 03:00:33
数字签名 信息隐
产生RSA公钥对 void GenerateRSAKey(unsigned int keyLength, const char *privFilename, const char *pubFilename, const char *seed) { RandomPool randPool; randPool.Put((byte *)seed, strlen(seed)); RSAES_OAEP_SHA_Decryptor priv(randPool, keyLength); HexEncoder privFile(new FileSink(privFilename)); priv.DEREncode(privFile); privFile.Close(); RSAES_OAEP_SHA_Encryptor pub(priv); HexEncoder pubFile(new FileSink(pubFilename)); pub.DEREncode(pubFile); pubFile.Close(); }