Is there a standard way to generate Hash passwords with Microsoft?

Is there a standard way to generate a Hash password with Microsoft development tools? Or maybe the most common way. (I read that there is MD5, STA1)

Unfortunately, I do not have the server source code, but you must use SOAP web services. There must be some algorithm for generating the hash code. I need to implement it using Java or using some library.

Here is the part of the SOAP request that I need to send to the server. Take a look at oldPasswordHash.

- <ChangePassword xmlns="urn:____________">
  <sessionGUID>{864da5f3-21b6-486a-8bd3-c507ae3d224e}</sessionGUID> 
  <oldPasswordHash>089ad55bd0a8f6d3c2e2bbf0e4e1475c7e984ef1</oldPasswordHash> 
  <newPasswordHash>f4a69973e7b0bf9d160f9f60e3c3acd2494beb0d</newPasswordHash> 
  </ChangePassword>
+3
source share
3 answers

These are SHA1 hashes of non-created passwords.

f4a69973e7b0bf9d160f9f60e3c3acd2494beb0dis the SHA1 hash Passw0rd!.

, , , .

# :

public static string Hash(string value)
{
   var sha = new System.Security.Cryptography.SHA1CryptoServiceProvider();
   byte[] hash = sha.ComputeHash(Encoding.ASCII.GetBytes(value));
   return BytesToHex(hash).ToLower();
}

private static string BytesToHex(byte[] bytes)
{
   return String.Concat(Array.ConvertAll(bytes, x => x.ToString("X2")));
}

java- Google "sha1 java" .

+6

, -, -, ( , ) . , ( ), - Rainbow. (SHA256 .)

, System.Security.Cryptography .NET.

, Windows. , GNU Cygwin ( ) .

+1

Cygwin Windows , sha1sum coreutils, . Bouncy Castle Java, .NET.

XML . , 40 20 160 . SHA-1 ( 160 ), . , . , , , .. , sha1sum , , , . , . Bouncy Castle.

0

Source: https://habr.com/ru/post/1770684/


All Articles