vb.net中的Google recaptcha v2加密 [英] Google recaptcha v2 encryption in vb.net

查看:181
本文介绍了vb.net中的Google recaptcha v2加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图实现Googles Recaptcha v2的安全令牌版本,我已经成功实现了单站版本。问题是我们需要使用相同的密钥来验证多个域。在这里的文档之后,让我刮目相看。 加密您的字符串区域对于新用户(我)来说有点模糊。我已经尝试使用标准的AES加密与我自己的盐,但没有运气,我遇到了错误:无效的



使用这篇文章 AES加密/解密已经加密和解密了一些结果,但是我得到相关的错误消息在recaptcha。



要尝试和测试加密,我正在关注底层回答中的内容如何使用PHP生成Google ReCaptcha V2安全令牌?



有没有人在VB.NET中工作?我的代码目前是阻止这两个帖子中的内容,继第二个帖子后,我得到以下输出:




  • Json: {session_id:1,ts_ms:1437712654577}


  • 3330MgoTAAA333XFM388zn66iPtjOdQgREfZAgqZ


  • 加密: Ly32WGlavKyWBDBIip5IRHdZMCaeIe1077RJQ1sQ17UzNOj1SmvBQVipj3mGI32d / p>




您可以看到加密的格式已关闭,至少从该SO帖子中的建议开始。 p>

干杯

解决方案

我已经创建了Recaptcha V2安全令牌的工作示例在这里交换:



RecaptchaV2.NET



它是在C#中,但您可以使用您最喜欢的在线C#到VB .NET代码转换器将其转换为VB。


I am attempting to implement the secure token version of Googles Recaptcha v2, I have successfully implemented the single site version. The issue is we will need multiple domains to validate with the same key. Following the documentation here, has left me scratching my head. The "Encrypt your string" area is a bit vague for a new user (me). I have tried using standard AES encryption with my own salt but with no luck, I am met with ERROR: Invalid stoken

Working with this post AES encryption/decryption has yeilded some results with encryption and decryption but I get the same error message in recaptcha.

To try and test the encryption I am following what was posted in the bottom answer How to generate a Google ReCaptcha V2 secure token with PHP?

Has anyone gotten this working in VB.NET? My code currently is block for block what is in those two posts, following the second post I am getting the following outputs:

  • Json: {"session_id":"1","ts_ms":1437712654577}

  • Site Secret: 3330MgoTAAA333XFM388zn66iPtjOdQgREfZAgqZ

  • Encryption: Ly32WGlavKyWBDBIip5IRHdZMCaeIe1077RJQ1sQ17UzNOj1SmvBQVipj3mGI32d

You can see the format of the encryption is off, at least from what is suggested in that SO post.

Cheers

解决方案

I have created a working example of Recaptcha V2 secure token exchange here:

RecaptchaV2.NET

It is in C#, but you can use your favorite online C# to VB .NET code converter to get it translated to VB.

这篇关于vb.net中的Google recaptcha v2加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆