Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 146 for hash2 (0.05 sec)

  1. src/test/java/jcifs/smb/PreauthIntegrityTest.java

            // Verify hash is not null
            byte[] hash = transport.getPreauthIntegrityHash();
            assertNotNull(hash);
    
            // Verify hash is a copy, not the original
            byte[] hash2 = transport.getPreauthIntegrityHash();
            assertNotSame(hash, hash2);
            assertArrayEquals(hash, hash2);
        }
    
        /**
         * Test that pre-auth hash is reset on error
         */
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 10.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/hash/HashTestUtils.java

            int key2 = key1 ^ (1 << i);
            // get hashes
            int hash1 = function.hashInt(key1).asInt();
            int hash2 = function.hashInt(key2).asInt();
            // test whether the hash values have same output bits
            same |= ~(hash1 ^ hash2);
            // test whether the hash values have different output bits
            diff |= hash1 ^ hash2;
    
            count++;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 25.6K bytes
    - Viewed (0)
  3. src/test/java/jcifs/util/CryptoTest.java

        @DisplayName("Should calculate MD4 hash correctly")
        void testMD4Hash() {
            // Given
            String input = "Hello World";
            byte[] data = input.getBytes();
    
            // When
            MessageDigest md4 = Crypto.getMD4();
            byte[] hash = md4.digest(data);
    
            // Then
            assertNotNull(hash);
            assertEquals(16, hash.length); // MD4 produces 128-bit hash
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/NtlmUtilTest.java

            // Act
            byte[] hash1 = NtlmUtil.getNTHash(password1);
            byte[] hash2 = NtlmUtil.getNTHash(password2);
    
            // Assert
            assertFalse(Arrays.equals(hash1, hash2), "Different passwords should produce different hashes");
            assertEquals(16, hash1.length, "NT hash should be 16 bytes");
            assertEquals(16, hash2.length, "NT hash should be 16 bytes");
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 12K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/SmbTransportImplTest.java

                byte[] hash1 = transport.calculatePreauthHash(input, 0, input.length, null);
                assertNotNull(hash1);
                assertEquals(64, hash1.length, "SHA-512 size");
    
                byte[] hash2 = transport.calculatePreauthHash(new byte[] { 50 }, 0, 1, hash1);
                assertNotNull(hash2);
                assertEquals(64, hash2.length);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.6K bytes
    - Viewed (0)
  6. src/test/java/jcifs/netbios/NameTest.java

        }
    
        @Test
        void hashCode_shouldBeConsistent() {
            Name name = new Name(mockConfig, "TEST", 0x20, "scope");
            int hash1 = name.hashCode();
            int hash2 = name.hashCode();
    
            assertEquals(hash1, hash2);
        }
    
        @Test
        void hashCode_withSameValues_shouldBeEqual() {
            Name name1 = new Name(mockConfig, "TEST", 0x20, "scope");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.4K bytes
    - Viewed (0)
  7. src/test/java/jcifs/ntlmssp/av/AvChannelBindingsTest.java

            assertArrayEquals(testHash, avChannelBindings.getRaw(), "Value should match the provided hash");
        }
    
        /**
         * Test that the constructor handles a null channel binding hash.
         */
        @Test
        void testConstructorWithNullHash() {
            AvChannelBindings avChannelBindings = new AvChannelBindings(null);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/nego/PreauthIntegrityNegotiateContextTest.java

            buffer = new byte[BUFFER_SIZE];
        }
    
        @Nested
        @DisplayName("Constructor Tests")
        class ConstructorTests {
    
            @Test
            @DisplayName("Should create instance with Configuration, hash algorithms and salt")
            void testConstructorWithConfigHashAlgosAndSalt() {
                int[] hashAlgos = { PreauthIntegrityNegotiateContext.HASH_ALGO_SHA512 };
                byte[] salt = { 0x01, 0x02, 0x03, 0x04 };
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 34K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb/NtlmNtHashAuthenticator.java

    package jcifs.smb;
    
    import org.bouncycastle.util.encoders.Hex;
    
    /**
     * Authenticator directly specifing the user's NT hash
     *
     * @author mbechler
     *
     */
    public class NtlmNtHashAuthenticator extends NtlmPasswordAuthenticator {
    
        private static final long serialVersionUID = 4328214169536360351L;
        /** The NT hash for authentication */
        private final byte[] ntHash;
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 2.6K bytes
    - Viewed (0)
  10. guava/src/com/google/common/hash/Hashing.java

        return (bits + 31) & ~31;
      }
    
      /**
       * Returns a hash function which computes its hash code by concatenating the hash codes of the
       * underlying hash functions together. This can be useful if you need to generate hash codes of a
       * specific length.
       *
       * <p>For example, if you need 1024-bit hash codes, you could join two {@link Hashing#sha512} hash
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 22:06:57 UTC 2025
    - 31.1K bytes
    - Viewed (0)
Back to top