Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

ring create an RSA key from PEM encoded string

/* create an RSA key from a PEM file */
try
        rsaKeyPEM = Read("privateKey.pem")
        rsaKey = rsa_import_pem(rsaKeyPEM)

        rsaPublicKeyPEM = Read("publicKey.pem")
        rsaPublicKey = rsa_import_pem(rsaPublicKeyPEM)
catch
        See "Unexpected error occured: " + cCatchError + nl
done
Source by ring-lang.github.io #
 
PREVIOUS NEXT
Tagged: #ring #create #RSA #key #PEM #encoded #string
ADD COMMENT
Topic
Name
3+4 =