EasyManuals Logo

WAVECONTROL SMP2 User Manual

WAVECONTROL SMP2
97 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #90 background imageLoading...
Page #90 background image
Example c# code to generate the MD5
using System;
using System.text;
using System.Security.Cryptography;
private string AddMd5(string cmd)
{
String formatted_xml = cmd;
String result = string.Empty;
string[] string_parts;
/* Add a <md5>MD5_VALUE</md5> tag before the closing </cmd> tag. */
if (!formatted_xml.Contains(“<md5>”))
{
/* Split result: before “</cmd>” and after “</cmd>”: */
string[] tokenizer = new string[1];
tokenizer[0] = “</cmd>”;
string_parts = formatted_xml.Split(tokenizer, 3,
StringSplitOptions.None);
if (string_parts.Length == 2)
{
//Calculate MD5 of the chunk before “</cmd>
using (var md5 = MD5.Create())
{
string md5_str = BitConverter.ToString(md5.
ComputeHash(Encoding.UTF8.GetBytes(string_parts[0]))).Replace(“-”, “”).ToLower();
//Add it to the result
result = string_parts[0] + “<md5>” + md5_str + “</md5></
cmd>”;
}
}
}
return result;
}
User’s Manual Electromagnetic Field Meter SMP2 P. 88

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the WAVECONTROL SMP2 and is the answer not in the manual?

WAVECONTROL SMP2 Specifications

General IconGeneral
BrandWAVECONTROL
ModelSMP2
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals