Searched defs:encoded (Results 1 - 24 of 24) sorted by relevance

/libcore/luni/src/main/java/java/security/
H A DKeyRep.java44 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/java/security/cert/
H A DPolicyQualifierInfo.java31 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...]
/libcore/luni/src/main/java/libcore/util/
H A DHexEncoding.java58 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/org/apache/harmony/security/x509/
H A DX509PublicKey.java24 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 DDNParser.java57 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/support/src/test/java/org/apache/harmony/security/tests/support/
H A DPrivateKeyStub.java37 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 DPublicKeyStub.java40 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 DMyKeyPairGenerator1.java99 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 DKeyStoreTestSupport.java66 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...]
H A DTestCertUtils.java151 private static final byte[] encoded = new byte[] { 1, 2, 3, 4, 5, 6, 7, field in class:TestCertUtils.TestCertPath
192 return encoded.clone();
200 return encoded.clone();
280 private static final byte[] encoded = new byte[] { 1, 2, 3, 4, 5, 6, 7, field in class:TestCertUtils.TestPublicKey
290 return encoded.clone();
306 private static final byte[] encoded = new byte[] { 1, 2, 3, 4, 5, 6, 7, field in class:TestCertUtils.TestCertificate
346 return encoded.clone();
454 * The encoded for of this X509Certificate is a byte array where
455 * first are bytes of encoded form of Subject (as X500Principal),
457 * and followed by the encoded for
[all...]
/libcore/luni/src/main/java/java/net/
H A DJarURLConnection.java196 private static String decode(String encoded) throws MalformedURLException { argument
202 encoded, convertPlus, StandardCharsets.UTF_8, true /* throwOnFailure */);
/libcore/luni/src/main/java/org/apache/harmony/security/x501/
H A DName.java46 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;
H A DAttributeValue.java50 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...]
/libcore/luni/src/main/java/javax/crypto/
H A DEncryptedPrivateKeyInfo.java68 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/main/java/org/apache/harmony/security/asn1/
H A DASN1Type.java81 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 DDerInputStream.java29 * 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 DBerOutputStream.java34 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 DBerInputStream.java31 * 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/test/java/org/apache/harmony/security/tests/java/security/
H A DKeyRepTest.java162 public KeyRepChild(KeyRep.Type type, String algorithm, String format, byte[] encoded) { argument
163 super(type, algorithm, format, encoded);
H A DKeyFactoryTest.java193 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/net/
H A DUrlEncodingTest.java250 * 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/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/
H A DCipherThread.java50 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/libcore/javax/net/ssl/
H A DDefaultHostnameVerifierTest.java448 X509Certificate parseCertificate(String encoded) throws Exception { argument
449 InputStream in = new ByteArrayInputStream(encoded.getBytes(StandardCharsets.US_ASCII));
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/auth/x500/
H A DX500PrincipalTest.java606 * gets encoded form
635 * gets encoded form
835 * gets encoded form
853 * gets encoded form
871 * gets encoded form
2545 byte[] encoded = (byte[]) obj[4];
2585 if (encoded != null) {
2586 if (!Arrays.equals(encoded, p.getEncoded())) {
2969 byte[] encoded = (byte[]) values[0];
2977 p = new X500Principal(encoded);
3037 add(String param, String rfc2253, String rfc1779, byte[] encoded) argument
3043 add(String param, String rfc2253, String rfc1779, byte[] encoded, byte mask) argument
3049 add(String param, String rfc2253, String rfc1779, String canonical, byte[] encoded) argument
3055 add(String param, String rfc2253, String rfc1779, String canonical, byte[] encoded, byte mask) argument
[all...]

Completed in 537 milliseconds