conterm/libsec/rsaencrypt.c

13 lines
192 B
C
Raw Normal View History

2005-08-08 16:50:13 +04:00
#include "os.h"
#include <mp.h>
#include <libsec.h>
mpint*
rsaencrypt(RSApub *rsa, mpint *in, mpint *out)
{
if(out == nil)
out = mpnew(0);
mpexp(in, rsa->ek, rsa->n, out);
return out;
}