openssl_sign($dados, $signature, $pkeyid)); // return 1 $signatureValue = base64_encode($signature); $funcionam = base64_decode($dados_que_nao); $pubKey = file_get_contents('protected/models/nfe/certs/cert.pem'); openssl_verify($funcionam,$signature, $pubKey)); // return 0; if I remove the de base64 encrypt and decrypt. It works fine. Can someone helpme with this?