1234567891011 |
- def raw(cls, secret, user):
- """encode password using mscash v1 algorithm
- :arg secret: secret as unicode or utf-8 encoded bytes
- :arg user: username to use as salt
- :returns: returns string of raw bytes
- """
- secret = to_unicode(secret, "utf-8", param="secret").encode("utf-16-le")
- user = to_unicode(user, "utf-8", param="user").lower().encode("utf-16-le")
- return md4(md4(secret).digest() + user).digest()
|