1.\" @(#)publickey.3r 2.1 88/08/07 4.0 RPCSRC 2.\" 3.Dd October 6, 1987 4.Dt PUBLICKEY 3 5.Os 6.Sh NAME 7.Nm publickey , getpublickey , getsecretkey 8.Nd "get public or secret key" 9.Sh LIBRARY 10.Lb librpcsvc 11.Sh SYNOPSIS 12.In rpc/rpc.h 13.In rpc/key_prot.h 14.Ft int 15.Fo getpublickey 16.Fa "const char netname[MAXNETNAMELEN+1]" 17.Fa "char publickey[HEXKEYBYTES+1]" 18.Fc 19.Ft int 20.Fo getsecretkey 21.Fa "char netname[MAXNETNAMELEN+1]" 22.Fa "char secretkey[HEXKEYBYTES+1]" 23.Fa "char *passwd" 24.Fc 25.Sh DESCRIPTION 26These routines are used to get public and secret keys from the 27.Tn YP 28database. 29The 30.Fn getsecretkey 31function 32has an extra argument, 33.Fa passwd , 34which is used to decrypt the encrypted secret key stored in the database. 35Both routines return 1 if they are successful in finding the key, 0 otherwise. 36The keys are returned as 37.Dv NUL Ns \-terminated , 38hexadecimal strings. 39If the password supplied to 40.Fn getsecretkey 41fails to decrypt the secret key, the routine will return 1 but the 42.Fa secretkey 43argument will be a 44.Dv NUL 45string 46.Pq Dq . 47.Sh SEE ALSO 48.Xr publickey 5 49.Pp 50.%T "RPC Programmer's Manual" 51in 52.Pa /usr/share/doc/psd/23.rpc . 53