我需要以下代码的dot net等效版本。问题在于,我正在客户端使用Ruby进行加密,以下是代码。 编码后的字符串将传递给C# Web服务。必须解密该字符串。
如果有人能提供此代码的dot net等效版本,则会很有帮助。
require 'rubygems'
require 'ezcrypto'
require 'crypt/rijndael'
plaintext = '24.9195N 17.821E'
aes_key = Crypt::Rijndael.new('0123456789abcdef0123456789abcdef')
aes_cyphertext = aes_key.encrypt_string(plaintext)
print "\n"
print aes_cyphertext +"\n"
print Base64.encode64(aes_cyphertext)
print "\n"
print aes_key.decrypt_string(aes_cyphertext)
print "\n"