Strtocert takes a string argument containing a user name, a hash algorithm, a certifying authority and an expiration time. Fields are separated by a newline. The return value is a Certificate . If the string is of improper format, the result is nil .
Certtostr performs the inverse operation: takes the Certificate c and produces a text string suitable for communication over a network.
Strtopk and strtosk take as their arguments a string s representing the public and private keys respectively. S must contain an algorithm name, a user name and the key. Fields are separated by a newline. Strtopk returns a reference to the resulting PK ; strtosk returns a reference to the resulting SK . If the format of s is invalid, the result is nil .
Pktostr and sktostr perform the inverse operations: they take a public key (secret key) and produce a printable representation as a string.