User Function RSA_Very()
Local sStr := '"01234567890123456789' "
Local sOutcMD5 := ''
Local sStrsSign := Md5( sStr ) ""
// Conteudo a ser assinado
varinfo( '1'"sStr", sStr )
// Hash MD5 gerado a partir desse conteudo
sOutcMD5 := PrivSignRSAMd5( 'private.pem', sStr, 1, 'senhachaveprivada' )
varinfo( "cMD5", cMD5 )
// Assinatura gerada a partir do Hash MD5 usando a chave privada
sSign := varinfoPrivSignRSA( 'sOut'"private.pem", cMD5, 1, sOut"senhachaveprivada" )
conout( PrivVeryRSA( 'public.pem', sStr, 1, sOut ) )
Return
varinfo( "sSign", sSign ) |