/libcore/support/src/test/java/org/apache/harmony/security/tests/support/ |
H A D | PrivateKeyStub.java | 37 byte [] encoded = null; field in class:PrivateKeyStub 45 * @param encoded 47 public PrivateKeyStub(String algorithm, String format, byte[] encoded) { argument 50 this.encoded = encoded; 70 * Returns encoded form 74 return encoded;
|
H A D | PublicKeyStub.java | 40 byte [] encoded = null; field in class:PublicKeyStub 45 public PublicKeyStub(String algorithm, String format, byte[] encoded) { argument 48 this.encoded = encoded; 67 * returns encoded 71 return encoded;
|
H A D | MyKeyPairGenerator1.java | 99 private byte[] encoded; field in class:MyKeyPairGenerator1.PubKey 104 this.encoded = new byte[10]; 116 return encoded; 125 private byte[] encoded; field in class:MyKeyPairGenerator1.PrivKey 130 this.encoded = new byte[10]; 142 return encoded;
|
H A D | KeyStoreTestSupport.java | 66 private byte[] encoded; field in class:KeyStoreTestSupport.SKey 68 public SKey(String type, byte[] encoded) { argument 70 this.encoded = encoded; 78 return encoded; 94 private byte[] encoded; field in class:KeyStoreTestSupport.MyPrivateKey 96 public MyPrivateKey(String algorithm, String format, byte[] encoded) { argument 99 this.encoded = encoded; 111 return encoded; [all...] |
/libcore/luni/src/main/java/java/security/cert/ |
H A D | PolicyQualifierInfo.java | 31 private final byte[] encoded; field in class:PolicyQualifierInfo 36 // DER encoding of the policy qualifier - part of encoded 40 * Creates a new {@code PolicyQualifierInfo} from the specified encoded 43 * @param encoded 44 * the DER encoded policy qualifier. 48 public PolicyQualifierInfo(byte[] encoded) throws IOException { argument 49 if (encoded == null) { 50 throw new NullPointerException("encoded == null"); 52 if (encoded.length == 0) { 53 throw new IOException("encoded [all...] |
H A D | Certificate.java | 82 // check that encoded forms match 102 byte[] encoded = getEncoded(); 104 for (int i=0; i<encoded.length; i++) { 105 hash += i*encoded[i]; 114 * Returns the encoded representation for this certificate. 116 * @return the encoded representation for this certificate. 224 * certificate type and encoded data. 229 * the encoded data.
|
/libcore/luni/src/main/java/org/apache/harmony/security/x509/ |
H A D | X509PublicKey.java | 24 private final byte[] encoded; field in class:X509PublicKey 27 public X509PublicKey(String algorithm, byte[] encoded, byte[] keyBytes) { argument 29 this.encoded = encoded; 42 return encoded;
|
H A D | SubjectPublicKeyInfo.java | 61 /** the ASN.1 encoded form of SubjectPublicKeyInfo */ 96 * Returns ASN.1 encoded form of this X.509 SubjectPublicKeyInfo value. 111 final byte[] encoded = getEncoded(); 112 final KeySpec keySpec = new X509EncodedKeySpec(encoded); 133 publicKey = new X509PublicKey(algOid, encoded, subjectPublicKey);
|
H A D | DNParser.java | 57 private byte[] encoded; field in class:DNParser 168 // encoded byte array must be not less then 4 c 199 // encoded byte array must be not less then 4 and must be even number 206 encoded = new byte[hexLen / 2]; 207 for (int i = 0, p = beg + 1; i < encoded.length; p += 2, i++) { 208 encoded[i] = (byte) getByte(p); 409 atav.add(new AttributeTypeAndValue(oid, new AttributeValue(hexAV(), encoded)));
|
/libcore/luni/src/main/java/libcore/util/ |
H A D | HexEncoding.java | 58 public static byte[] decode(char[] encoded, boolean allowSingleChar) throws IllegalArgumentException { argument 59 int resultLengthBytes = (encoded.length + 1) / 2; 65 if ((encoded.length % 2) != 0) { 67 result[resultOffset++] = (byte) toDigit(encoded, i); 71 if ((encoded.length % 2) != 0) { 72 throw new IllegalArgumentException("Invalid input length: " + encoded.length); 76 for (int len = encoded.length; i < len; i += 2) { 77 result[resultOffset++] = (byte) ((toDigit(encoded, i) << 4) | toDigit(encoded, i + 1));
|
/libcore/luni/src/main/java/java/security/ |
H A D | KeyRep.java | 44 private byte[] encoded; field in class:KeyRep 57 * @param encoded 58 * the encoded {@code byte[]} (obtained by 61 * if {@code type, algorithm, format or encoded} is {@code null} 64 public KeyRep(Type type, String algorithm, String format, byte[] encoded) { argument 68 this.encoded = encoded; 78 if(this.encoded == null) { 79 throw new NullPointerException("encoded == null"); 89 * is initialized with a {@link PKCS8EncodedKeySpec} using the encoded ke [all...] |
/libcore/luni/src/main/java/org/apache/harmony/security/asn1/ |
H A D | BerOutputStream.java | 34 public byte[] encoded; field in class:BerOutputStream 39 /** Current encoded length */ 42 /** Current encoded content */ 46 encoded[offset++] = (byte) tag; //FIXME long form? 55 encoded[offset] = (byte) (numOctets | 0x80); 61 encoded[numOffset - i] = (byte) eLen; //FIXME long value? 65 encoded[offset++] = (byte) length; 70 System.arraycopy(content, 0, encoded, offset, length); 77 encoded[offset] = (byte) bStr.unusedBits; 78 System.arraycopy(bStr.bytes, 0, encoded, offse [all...] |
H A D | ASN1Type.java | 81 public final Object decode(byte[] encoded) throws IOException { argument 82 return decode(new DerInputStream(encoded)); 85 public final Object decode(byte[] encoded, int offset, int encodingLen) argument 87 return decode(new DerInputStream(encoded, offset, encodingLen)); 94 public final void verify(byte[] encoded) throws IOException { argument 95 DerInputStream decoder = new DerInputStream(encoded); 108 return out.encoded;
|
H A D | DerInputStream.java | 29 * Decodes ASN.1 types encoded with DER (X.690) 39 public DerInputStream(byte[] encoded) throws IOException { argument 40 super(encoded, 0, encoded.length); 43 public DerInputStream(byte[] encoded, int offset, int encodingLen) throws IOException { argument 44 super(encoded, offset, encodingLen); 83 // check encoded content 128 // It is a string type and it can be encoded as primitive or constructed. 144 // It is a string type and it can be encoded as primitive or constructed.
|
H A D | BerInputStream.java | 31 * Decodes ASN.1 types encoded with BER (X.690) 75 public BerInputStream(byte[] encoded) throws IOException { argument 76 this(encoded, 0, encoded.length); 82 * @param encoded bytes array to be decoded 87 public BerInputStream(byte[] encoded, int offset, int expectedLength) throws IOException { argument 89 this.buffer = encoded; 138 * @param encoded a new bytes array to be decoded 141 public final void reset(byte[] encoded) throws IOException { argument 142 buffer = encoded; [all...] |
/libcore/luni/src/main/java/org/apache/harmony/security/x501/ |
H A D | AttributeValue.java | 50 public byte[] encoded; field in class:AttributeValue 52 public byte[] bytes; //FIXME remove??? bytes to be encoded 78 public AttributeValue(String hexString, byte[] encoded) { argument 82 this.encoded = encoded; 85 DerInputStream in = new DerInputStream(encoded); 104 public AttributeValue(String rawString, byte[] encoded, int tag) { argument 107 this.encoded = encoded; 147 encoded [all...] |
H A D | Name.java | 46 private volatile byte[] encoded; field in class:Name 211 * Gets encoded form of DN 216 if (encoded == null) { 217 encoded = ASN1.encode(this); 219 return encoded;
|
/libcore/luni/src/test/java/tests/security/spec/ |
H A D | EncodedKeySpec2Test.java | 49 byte[] encoded = keys.getPublic().getEncoded(); 50 Key key = fact.generatePublic(new X509EncodedKeySpec(encoded)); 56 encoded = keys.getPrivate().getEncoded(); 57 key = fact.generatePrivate(new PKCS8EncodedKeySpec(encoded));
|
/libcore/luni/src/test/java/libcore/java/net/ |
H A D | UrlEncodingTest.java | 250 * Asserts that {@code original} encodes to {@code encoded} using both URI 253 private void assertEncoded(String encoded, String original) throws Exception { argument 254 assertEquals(encoded, URLEncoder.encode(original, "UTF-8")); 255 assertEquals(encoded, URLEncoder.encode(original)); 256 assertEquals(encoded, new URI("http", "foo", "/", original).getRawFragment()); 259 private void assertRoundTrip(String original, String encoded) throws Exception { argument 260 assertEquals(encoded, URLEncoder.encode(original, "UTF-8")); 261 assertEquals(original, URLDecoder.decode(encoded, "UTF-8"));
|
/libcore/luni/src/main/java/javax/crypto/ |
H A D | EncryptedPrivateKeyInfo.java | 68 private volatile byte[] encoded; field in class:EncryptedPrivateKeyInfo 71 * Creates an {@code EncryptedPrivateKeyInfo} instance from its encoded 74 * @param encoded 75 * the encoded representation of this object 77 * if parsing the encoded representation fails. 79 * if {@code encoded} is {@code null}. 81 public EncryptedPrivateKeyInfo(byte[] encoded) throws IOException { argument 82 if (encoded == null) { 83 throw new NullPointerException("encoded == null"); 85 this.encoded [all...] |
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
H A D | KeyFactoryTest.java | 193 assertTrue(Arrays.equals(key.encoded, publicKey.getEncoded())); 435 return new TestPrivateKey(((TestPrivateKeySpec)keySpec).encoded); 445 return new TestPublicKey(((TestPublicKeySpec)keySpec).encoded); 508 private final byte[] encoded; field in class:KeyFactoryTest.TestPrivateKeySpec 511 this.encoded = key.getEncoded(); 517 private final byte[] encoded; field in class:KeyFactoryTest.TestPublicKeySpec 520 this.encoded = key.getEncoded(); 526 private final byte[] encoded; field in class:KeyFactoryTest.TestPrivateKey 529 encoded = new byte[] {3, 4, 5}; 532 public TestPrivateKey(byte[] encoded) { argument 551 private final byte[] encoded; field in class:KeyFactoryTest.TestPublicKey 557 TestPublicKey(byte[] encoded) argument [all...] |
/libcore/luni/src/test/java/libcore/java/security/cert/ |
H A D | SubjectAlternativeNameTest.java | 67 byte[] encoded = certificate.getEncoded(); 69 return (X509Certificate) factory.generateCertificate(new ByteArrayInputStream(encoded));
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
H A D | CipherThread.java | 50 public void checkEncodedData(byte[] original, byte[] encoded) argument 53 if (original[i] != encoded[i]) { 54 throw new Exception("Source and encoded data not match " + 60 public void checkPaddedEncodedData(byte[] original, byte[] encoded, int offset) argument 63 if (encoded[i] != 0) { 68 if (original[i] != encoded[i + offset]) { 69 throw new Exception("Source and encoded data not match " + getCipherParameters());
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/x509/ |
H A D | SubjectPublicKeyInfoTest.java | 92 byte[] encoded = pubKey.getEncoded(); 95 Arrays.toString(Arrays.copyOfRange(encoded, encoded.length 96 - ENCODED_BROKEN.length, encoded.length)));
|
/libcore/luni/src/main/java/java/net/ |
H A D | JarURLConnection.java | 196 private static String decode(String encoded) throws MalformedURLException { argument 202 encoded, convertPlus, StandardCharsets.UTF_8, true /* throwOnFailure */);
|