Home
XmppDotNet
MatriX XMPP SDK ▼
Forum
About us ▼
Contact
Not logged in.
·
Lost password
·
Registration disabled
Forum
Search
Members
Forum:
MatriX and XmppDotNet
Non-SASL Authentication
roymanish1982
2011-06-23, 08:43
#1
Member since Mar 2011 ·
20
posts
Group memberships:
Members
Show profile
·
Link to this post
Subject:
Non-SASL Authentication
Matrix.Util.Sha1HashHex is Missing in MatriX build ?
i need to decrypt the Digest part
Thanks
Alex
2011-06-23, 13:17
#2
Member since Feb 2003 ·
4449
posts · Location: Germany
Group memberships:
Administrators, Members
Show profile
·
Link to this post
I have uploaded a new dll to the latest downloads where this function is public. Please download it.
Alex
roymanish1982
2011-06-29, 10:56
#3
Member since Mar 2011 ·
20
posts
Group memberships:
Members
Show profile
·
Link to this post
Still i didnt found the Class
Matrix.Util.Sha1HAshHex its still showing
Matrix.Util.Time
Please help me
Alex
2011-06-29, 11:09
#4
Member since Feb 2003 ·
4449
posts · Location: Germany
Group memberships:
Administrators, Members
Show profile
·
Link to this post
using
System.Text
;
using
System.Security.Cryptography
;
public
static
string
Sha1HashHex
(
string
pass
)
{
var
hash
=
Sha1HashBytes
(
pass
)
;
return
HexToString
(
hash
)
;
}
public
static
byte
[
]
Sha1HashBytes
(
string
pass
)
{
var
bytes
=
Encoding
.
UTF8
.
GetBytes
(
pass
)
;
return
Sha1HashBytes
(
bytes
)
;
}
public
static
byte
[
]
Sha1HashBytes
(
byte
[
]
pass
)
{
using
(
var
sha
=
new
SHA1Managed
(
)
)
{
return
sha
.
ComputeHash
(
pass
)
;
}
}
public
static
string
HexToString
(
byte
[
]
buf
)
{
var
sb
=
new
StringBuilder
(
)
;
foreach
(
byte
b
in
buf
)
{
sb
.
Append
(
b
.
ToString
(
"x2"
)
)
;
}
return
sb
.
ToString
(
)
;
}
Close
Smaller –
Larger +
Reply to this post:
Verification code:
Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys:
Special characters:
Forum:
MatriX and XmppDotNet