/* following came from the other byteorder.h to avoid include conflicts */ #define CVAL(buf,pos) (((unsignedchar *)(buf))[pos]) #define SSVALX(buf,pos,val) (CVAL(buf,pos)=(val)&0xFF,CVAL(buf,pos+1)=(val)>>8) #define SSVAL(buf,pos,val) SSVALX((buf),(pos),((__u16)(val)))
/* produce a md4 message digest from data of length n bytes */ staticint
mdfour(unsignedchar *md4_hash, unsignedchar *link_str, int link_len)
{ int rc; struct md4_ctx mctx;
rc = cifs_md4_init(&mctx); if (rc) {
cifs_dbg(VFS, "%s: Could not init MD4\n", __func__); goto mdfour_err;
}
rc = cifs_md4_update(&mctx, link_str, link_len); if (rc) {
cifs_dbg(VFS, "%s: Could not update MD4\n", __func__); goto mdfour_err;
}
rc = cifs_md4_final(&mctx, md4_hash); if (rc)
cifs_dbg(VFS, "%s: Could not finalize MD4\n", __func__);
int
E_md4hash(constunsignedchar *passwd, unsignedchar *p16, conststruct nls_table *codepage)
{ int rc; int len;
__le16 wpwd[129];
/* Password cannot be longer than 128 characters */ if (passwd) /* Password must be converted to NT unicode */
len = cifs_strtoUTF16(wpwd, passwd, 128, codepage); else {
len = 0;
*wpwd = 0; /* Ensure string is null terminated */
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.