Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for SecretKeySpec (0.12 sec)

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

            // When
            Cipher encryptCipher = Crypto.getArcfour(key);
            encryptCipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "RC4"));
            byte[] encrypted = encryptCipher.doFinal(plaintext);
    
            Cipher decryptCipher = Crypto.getArcfour(key);
            decryptCipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "RC4"));
            byte[] decrypted = decryptCipher.doFinal(encrypted);
    
            // Then
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  2. src/main/java/jcifs/pac/PacMac.java

    import java.security.MessageDigest;
    import java.util.Arrays;
    import java.util.Map;
    
    import javax.crypto.Cipher;
    import javax.crypto.Mac;
    import javax.crypto.spec.IvParameterSpec;
    import javax.crypto.spec.SecretKeySpec;
    import javax.security.auth.kerberos.KerberosKey;
    
    /**
     * Utility class for calculating and verifying PAC (Privilege Attribute Certificate) message authentication codes.
    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/main/java/jcifs/util/Crypto.java

    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.security.Provider;
    
    import javax.crypto.Cipher;
    import javax.crypto.NoSuchPaddingException;
    import javax.crypto.spec.SecretKeySpec;
    
    import org.bouncycastle.jce.provider.BouncyCastleProvider;
    
    import jcifs.CIFSUnsupportedCryptoException;
    
    /**
     * Cryptographic utility class providing encryption and decryption functionality for jCIFS.
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  4. src/test/java/jcifs/pac/PacMacTest.java

         * @throws GeneralSecurityException
         */
        @Test
        void testCalculateMacArcfourHMACMD5() throws GeneralSecurityException {
            // 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
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 7.1K bytes
    - Viewed (0)
Back to top