Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8124081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:21:38+00:00 2026-06-06T06:21:38+00:00

So I am trying to implement NT & Lan Manager hashes in JavaScript (yeah

  • 0

So I am trying to implement NT & Lan Manager hashes in JavaScript (yeah I know not the best language choice for it!) but its to be used on a simple static web page where post-backs are not possible – so no PHP or .NET or Java.

The Issue I’m having is the first part of the protocol, basically you must ensure that the password is 14 characters, if its over 14 you need to trim (easy), however if its under 14 you need to null pad the password string to get it to fourteen characters.

How does one null pad a string in JavaScript?

Please note, I’m not asking how to zero pad a string in Javascript.

(Also bonus question, if anyone knows of any pre-made NT or LM hashing libraries in JS, I’d really appreciate the heads up!)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:21:39+00:00Added an answer on June 6, 2026 at 6:21 am
    function nullpad( str, len ) {
        if( str.length >= len ) {
            return str;
        }
    
        return str + Array( len-str.length + 1 ).join("\x00");
    }
    
    nullpad( "", 15 ).length
    //15
    
    nullpad( "asd", 15 ).length
    //15
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement swiping gestures for mobile devices in HTML/CSS & Javascript. It's
I'm trying to implement locale-specific pluralization rules in I18n & Rails, but I'm having
I'm trying to implement a WPF application with drag&drop functionality using MouseDragElementBehavior. But I
I am new to ASP.net & Jquery.I am trying to implement autocomplete in my
Trying to implement LoaderManager + CursorLoader. In onFinish method adapter should swap its cursor
Trying to implement 3-layer (not: tier, I just want to separate my project logically,
Trying to implement a rating system of users and postings. What is the best
I am trying to implement a scenario of cascading dropdown with MVC3 & Knockout
I am trying to implement MVVM in a new project (based on WPF &
I'm trying to implement my own list class but am having trouble reversing just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.