private static String[] clearSAMPasswords(File samFile, byte[] hBootKey)
	{
                StringBuffer samHashBuffer = new StringBuffer();
                Hive hive = new Hive(samFile);

                HashMap nameRIDMap = getUserRIDMap(hive);	//user account names mapped to RID values

		if(nameRIDMap == null)	//did the mapping fail
			return null;

		long curRID = -1;
		String curUserName = null;
		Object[] temp = nameRIDMap.keySet().toArray();
		String[] userNames = new String[temp.length];
		for(int j = 0; j < temp.length; j++)	//make array of usernames
			userNames[j] = (String)temp[j];

		long[] offsetToVStruct = new long[userNames.length];	//array of each username's offset to their V structure

		for(int i = 0; i < userNames.length; i++)
		{
			curUserName = userNames[i];
			curRID = ((Long)nameRIDMap.get(curUserName)).longValue();

			String hexRID = Long.toHexString(curRID);	//8 byte hex RID of current user without leading 0's

			if(hexRID.length() < 8)	//pad with leading zero's to make length 8
			{
				int padding = 8 - hexRID.length();
				StringBuffer sbuf = new StringBuffer(hexRID);
				for(int x = 0; x < padding; x++)
				{
					sbuf.insert(0, '0');	//insert leading zero
				}

				hexRID = sbuf.toString();
			}

			//build path to current user's V structure
			String path = "\\SAM\\Domains\\Account\\Users\\" + hexRID + "\\V";

			int vOffset = traversePath(hive, 0, path, 1);	//offset into vk structure for V struct
			VK_Structure finalVK = new VK_Structure(hive.getBuffer(), vOffset);
			offsetToVStruct[i] = finalVK.getOfs_data() + 0x1004;		//add the actual offset to the V structure to the array

                        SAMV_Structure samv = new SAMV_Structure(hive.getBuffer(), (int) offsetToVStruct[i], (int)finalVK.getLen_data());

                        samv.decrypt(hBootKey, (int)curRID);

                        System.out.println(samv.toString());

                        samHashBuffer.append(samv.getPWDUMPline() + System.getProperty("line.separator"));
		}

		//for all offsets (one for each user account), zero out the LM and NT hash lengths in SAM
		try
		{
	        RandomAccessFile raf = new RandomAccessFile(samFile, "rw");

			for(int a = 0; a < offsetToVStruct.length; a++) //for all of the V struct offsets (for each account name)
			{
				raf.seek(offsetToVStruct[a] + 0xa0);	//jump to lm hash length
				raf.write(0x00);			//zero it
				raf.seek(offsetToVStruct[a] + 0xac);	//jump to nt hash length
				raf.write(0x00);			//zero it
			}
			raf.close();
		}
		catch (IOException ioe)
		{
			System.out.println("I/O error while writing 0's to SAM File " + ioe.getMessage());
			return null;
		}

            samHashes = new String(samHashBuffer);

	    return userNames;
	}