a
This commit is contained in:
12
libsec/rsaencrypt.c
Normal file
12
libsec/rsaencrypt.c
Normal file
@ -0,0 +1,12 @@
|
||||
#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;
|
||||
}
|
Reference in New Issue
Block a user