Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for Mac (0.02 sec)

  1. src/main/java/jcifs/internal/smb2/Smb2SigningDigest.java

                // Create new Mac instance for thread safety without blocking other operations
                Mac mac;
                try {
                    mac = createMacInstance();
                } catch (GeneralSecurityException e) {
                    log.error("Failed to create Mac instance for signing", e);
                    throw new RuntimeException("Failed to create Mac instance", e);
                }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  2. src/main/java/jcifs/pac/PacMac.java

            int ms_usage = mapArcfourMD5KeyUsage(keyusage);
            Mac mac = Mac.getInstance("HmacMD5");
            MessageDigest md = MessageDigest.getInstance("MD5");
            mac.init(key);
            byte[] dk = mac.doFinal(MD5_CONSTANT);
            try {
                // little endian
                md.update((byte) (ms_usage & 0xFF));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 9K bytes
    - Viewed (0)
  3. src/test/java/jcifs/netbios/NodeStatusResponseTest.java

            System.arraycopy(name.getBytes("US-ASCII"), 0, src, srcIndex + 13, 16);
            src[srcIndex + 28] = 0x00; // hex code
            src[srcIndex + 29] = 0x04; // flags
            // MAC address (6 bytes)
            byte[] mac = new byte[6];
            System.arraycopy(mac, 0, src, srcIndex + 31, 6);
            // Stats (6 bytes)
            byte[] stats = new byte[6];
            System.arraycopy(stats, 0, src, srcIndex + 37, 6);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 19.3K bytes
    - Viewed (0)
  4. src/main/java/jcifs/NetbiosAddress.java

        /**
         * Retrieves the MAC address of the remote network interface. Samba returns all zeros.
         *
         * @param tc
         *            context to use
         *
         * @return the MAC address as an array of six bytes
         * @throws UnknownHostException
         *             if the host cannot be resolved to
         *             determine the MAC address.
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb1/smb1/SigningDigest.java

        private int updates;
        private int signSequence;
    
        /**
         * Constructs a new signing digest with the specified MAC signing key.
         *
         * @param macSigningKey the MAC signing key for message authentication
         * @param bypass whether to bypass MAC signing
         * @throws SmbException if MD5 algorithm is not available
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/pac/PacMacTest.java

            // Using a key with a known value for reproducibility
            SecretKeySpec key = new SecretKeySpec(new byte[16], "ARCFOUR");
            byte[] mac = PacMac.calculateMacArcfourHMACMD5(3, key, TEST_DATA);
            assertNotNull(mac);
            assertEquals(16, mac.length);
    
            // Test with a different key usage
            byte[] mac2 = PacMac.calculateMacArcfourHMACMD5(9, key, TEST_DATA);
            assertNotNull(mac2);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  7. src/main/java/jcifs/internal/SMBSigningDigest.java

     * message integrity and authenticity using MAC (Message Authentication Code) algorithms.
     *
     * @author mbechler
     */
    public interface SMBSigningDigest {
    
        /**
         * Performs MAC signing of the SMB. This is done as follows.
         * The signature field of the SMB is overwritten with the sequence number;
         * The MD5 digest of the MAC signing key + the entire SMB is taken;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb/NtlmContext.java

            final byte[] seqBytes = new byte[4];
            SMBUtil.writeInt4(seqNum, seqBytes, 0);
    
            final MessageDigest mac = Crypto.getHMACT64(sk);
            mac.update(seqBytes); // sequence
            mac.update(data); // data
            final byte[] dgst = mac.digest();
            byte[] trunc = new byte[8];
            System.arraycopy(dgst, 0, trunc, 0, 8);
    
            if (log.isDebugEnabled()) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 17.3K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb2/Smb2SigningDigestTest.java

                Mac mac = Mac.getInstance("HmacSHA256");
                mac.init(new SecretKeySpec(sessionKey, "HmacSHA256"));
    
                // Zero signature field for calculation
                Arrays.fill(data, SIGNATURE_OFFSET, SIGNATURE_OFFSET + SIGNATURE_LENGTH, (byte) 0);
                mac.update(data, 0, data.length);
                byte[] validSig = mac.doFinal();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 43.7K bytes
    - Viewed (0)
  10. src/main/java/jcifs/pac/kerberos/KerberosEncData.java

            Key macKey = new SecretKeySpec(key.clone(), KerberosConstants.HMAC_ALGORITHM);
            Mac mac = Mac.getInstance(KerberosConstants.HMAC_ALGORITHM);
            mac.init(macKey);
            return mac.doFinal(data);
        }
    
        /**
         * Returns the user's Kerberos realm.
         *
         * @return the user realm
         */
        public String getUserRealm() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 12.5K bytes
    - Viewed (0)
Back to top