Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for getMD5 (0.07 sec)

  1. src/test/java/jcifs/util/HMACT64Test.java

        @Mock
        private MessageDigest mockMd5;
    
        @BeforeEach
        void setUp() throws NoSuchAlgorithmException {
            // Mock Crypto.getMD5() to return our mockMd5 instance
            // This requires Mockito 3.4.0+ for MockedStatic
            // For simplicity, we'll assume Crypto.getMD5() is static and mock it.
            // If it's not static, we'd need to inject it or mock the class that provides it.
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.6K bytes
    - Viewed (0)
  2. src/test/java/jcifs/util/CryptoTest.java

                MessageDigest md5 = Crypto.getMD5();
                md5.digest(null);
            });
        }
    
        @Test
        @DisplayName("Should produce consistent hash results")
        void testHashConsistency() {
            // Given
            String input = "Test consistency";
            byte[] data = input.getBytes();
    
            // When
            MessageDigest md5_1 = Crypto.getMD5();
            MessageDigest md5_2 = Crypto.getMD5();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  3. src/main/java/jcifs/internal/smb1/SMB1SigningDigest.java

         *            The initial sequence number for signing
         */
        public SMB1SigningDigest(final byte[] macSigningKey, final boolean bypass, final int initialSequence) {
            this.digest = Crypto.getMD5();
            this.macSigningKey = macSigningKey;
            this.signSequence = initialSequence;
            this.bypass = bypass;
    
            if (log.isTraceEnabled()) {
                log.trace("macSigningKey:");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 11.9K bytes
    - Viewed (0)
  4. src/main/java/jcifs/util/HMACT64.java

                this.opad[i] = (byte) (key[i] ^ OPAD);
            }
            for (int i = length; i < BLOCK_LENGTH; i++) {
                this.ipad[i] = IPAD;
                this.opad[i] = OPAD;
            }
    
            this.md5 = Crypto.getMD5();
            engineReset();
        }
    
        private HMACT64(final HMACT64 hmac) throws CloneNotSupportedException {
            super("HMACT64");
            this.ipad = hmac.ipad;
            this.opad = hmac.opad;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  5. src/main/java/jcifs/util/Crypto.java

                throw new CIFSUnsupportedCryptoException(e);
            }
        }
    
        /**
         * Get an MD5 message digest instance.
         * @return MD5 digest instance
         */
        public static MessageDigest getMD5() {
            try {
                return MessageDigest.getInstance("MD5");
            } catch (final NoSuchAlgorithmException e) {
                throw new CIFSUnsupportedCryptoException(e);
            }
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb/NtlmContext.java

            }
        }
    
        private static byte[] deriveKey(final byte[] masterKey, final String cnst) {
            final MessageDigest md5 = Crypto.getMD5();
            md5.update(masterKey);
            md5.update(cnst.getBytes(StandardCharsets.US_ASCII));
            md5.update((byte) 0);
            return md5.digest();
        }
    
        @Override
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 17.3K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb/NtlmUtil.java

                throws GeneralSecurityException {
            final byte[] sessionHash = new byte[8];
    
            final MessageDigest md5 = Crypto.getMD5();
    
            md5.update(serverChallenge);
            md5.update(clientChallenge, 0, 8);
            System.arraycopy(md5.digest(), 0, sessionHash, 0, 8);
    
            final byte[] key = new byte[21];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 15.1K bytes
    - Viewed (0)
Back to top