tegprivtopub.c - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
tegprivtopub.c (273B)
---
1 #include "os.h"
2 #include <mp.h>
3 #include <libsec.h>
4
5 EGpub*
6 egprivtopub(EGpriv *priv)
7 {
8 EGpub *pub;
9
10 pub = egpuballoc();
11 if(pub == nil)
12 return nil;
13 pub->p = mpcopy(priv->pub.p);
14 pub->alpha = mpcopy(priv->pub.alpha);
15 pub->key = mpcopy(priv->pub.key);
16 return pub;
17 }