ws security username password

SOAP based WS Security User name password  request is two types

Password in clear text
Password in digest form

ws security username password clear text

Username and password are sent in clear text form.

 <wsse:Security xmlns:wsse="" xmlns:wsu="">
   <wsse:UsernameToken wsu:Id="UsernameToken-33"><wsse:Username>testuser</wsse:Username>
   <wsse:Password Type="">password</wsse:Password>

ws security username password digest

Password is sent in digest form.
  <wsse:Security xmlns:wsse="" xmlns:wsu="">
<wsse:UsernameToken wsu:Id="UsernameToken-34">
   <wsse:Password Type="">9Vy8Z0iXpass+NvXQ=</wsse:Password>
   <wsse:Nonce EncodingType="">81GQNZ9f/3NWKyCo9n0I9w==</wsse:Nonce>

Password digest contains four fields.
Creation Time Stamp.

Password Digest is calculated using combination of Password, Nonce value and TimeStamp.

Nonce is random generated number.

Password_Digest = Base64 ( SHA-1 ( nonce + created + password ) )

Example nonce 123456782017
timestamp  2017-05-23T12:49:29.006Z
password dummy

Append 1234567820172017-05-23T12:49:29.006Zdummy
Apply sha1 on appended value
then base64 will give Password Digest.