Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 32 for PACDecodingException (0.09 sec)

  1. src/test/java/jcifs/pac/PacDataInputStreamTest.java

            PacDataInputStream pdis = createInputStream(data);
            assertThrows(PACDecodingException.class, () -> pdis.readUnicodeString());
        }
    
        @Test
        public void testReadString() throws IOException, PACDecodingException {
            // total=4, unused=1, used=2, string="AB"
            byte[] data = new byte[] { 0x04, 0x00, 0x00, 0x00, // total
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  2. src/main/java/jcifs/pac/PacDataInputStream.java

         * @throws PACDecodingException if the string structure is malformed
         */
        public PacUnicodeString readUnicodeString() throws IOException, PACDecodingException {
            final short length = readShort();
            final short maxLength = readShort();
            final int pointer = readInt();
    
            if (maxLength < length) {
                throw new PACDecodingException("Malformed string in PAC");
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  3. src/test/java/jcifs/pac/kerberos/KerberosEncDataTest.java

    import org.bouncycastle.asn1.DERTaggedObject;
    import org.junit.jupiter.api.Test;
    
    import jcifs.pac.PACDecodingException;
    
    /**
     * Tests for KerberosEncData.
     */
    class KerberosEncDataTest {
    
        /**
         * Test constructor with a valid token.
         *
         * @throws IOException if an I/O error occurs
         * @throws PACDecodingException if a PAC decoding error occurs
         * @throws UnknownHostException if the IP address is not found
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.7K bytes
    - Viewed (0)
  4. src/test/java/jcifs/pac/PacMacTest.java

        }
    
        /**
         * Test method for
         * {@link jcifs.pac.PacMac#calculateMac(int, java.util.Map, byte[])}.
         *
         * @throws PACDecodingException
         */
        @Test
        void testCalculateMac() throws PACDecodingException {
            Map<Integer, KerberosKey> keys = new HashMap<>();
            KerberosKey hmacKey = new KerberosKey(TEST_PRINCIPAL, new byte[16], PacSignature.ETYPE_ARCFOUR_HMAC, 0);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  5. src/main/java/jcifs/pac/kerberos/KerberosRelevantAuthData.java

         *
         * @param token the authorization data token
         * @param keys map of Kerberos keys indexed by key type
         * @throws PACDecodingException if decoding fails
         */
        public KerberosRelevantAuthData(byte[] token, Map<Integer, KerberosKey> keys) throws PACDecodingException {
            ASN1Sequence authSequence;
            try {
                try (ASN1InputStream stream = new ASN1InputStream(new ByteArrayInputStream(token))) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 3K bytes
    - Viewed (0)
  6. src/main/java/jcifs/pac/PacUnicodeString.java

         *
         * @param string the string to validate
         * @return the validated string
         * @throws PACDecodingException if validation fails
         */
        public String check(final String string) throws PACDecodingException {
            if (this.pointer == 0 && string != null) {
                throw new PACDecodingException("Non-empty string");
            }
    
            final int expected = this.length / 2;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  7. src/main/java/jcifs/pac/kerberos/KerberosEncData.java

         *
         * @param token the encrypted Kerberos token
         * @param keys map of encryption keys indexed by key type
         * @throws PACDecodingException if decoding fails
         */
        public KerberosEncData(byte[] token, Map<Integer, KerberosKey> keys) throws PACDecodingException {
            ASN1InputStream stream = new ASN1InputStream(new ByteArrayInputStream(token));
            ASN1TaggedObject derToken;
            try {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  8. src/main/java/jcifs/pac/PacCredentialType.java

         * @param data the raw credential type data
         * @throws PACDecodingException if the credential type data is invalid
         */
        public PacCredentialType(final byte[] data) throws PACDecodingException {
            this.credentialType = data;
            if (!isCredentialTypeCorrect()) {
                throw new PACDecodingException("Invalid PAC credential type");
            }
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  9. src/main/java/jcifs/pac/kerberos/KerberosAuthData.java

         * @param keys the Kerberos keys for decryption
         * @return a list of parsed authorization data
         * @throws PACDecodingException if the data cannot be decoded
         */
        public static List<KerberosAuthData> parse(int authType, byte[] token, Map<Integer, KerberosKey> keys) throws PACDecodingException {
    
            List<KerberosAuthData> authorizations = new ArrayList<>();
    
            switch (authType) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  10. src/test/java/jcifs/pac/PacLogonInfoTest.java

        }
    
        @Test
        @DisplayName("Test parsing with invalid data size")
        void testInvalidDataSize() {
            byte[] tooSmall = new byte[10];
    
            PACDecodingException exception = assertThrows(PACDecodingException.class, () -> new PacLogonInfo(tooSmall));
    
            assertEquals("Malformed PAC", exception.getMessage());
        }
    
        @Test
        @DisplayName("Test getters return expected values using mocks")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.3K bytes
    - Viewed (0)
Back to top