/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/ojluni/src/main/java/java/security/ |
H A D | KeyRep.java | 105 * The encoded Key bytes 109 private byte[] encoded; field in class:KeyRep 121 * @param encoded the encoded bytes returned from 128 * or if encoded is <code>null</code> 131 String format, byte[] encoded) { 134 format == null || encoded == null) { 141 this.encoded = encoded.clone(); 150 * constructed using encoded ke 130 KeyRep(Type type, String algorithm, String format, byte[] encoded) argument [all...] |
/libcore/ojluni/src/main/java/java/security/cert/ |
H A D | PolicyQualifierInfo.java | 94 * encoded bytes. The encoded byte array is copied on construction. 96 * @param encoded a byte array containing the qualifier in DER encoding 100 public PolicyQualifierInfo(byte[] encoded) throws IOException { argument 101 mEncoded = encoded.clone(); 130 * Returns the ASN.1 DER encoded form of this 133 * @return the ASN.1 DER encoded bytes (never <code>null</code>). 142 * Returns the ASN.1 DER encoded form of the <code>qualifier</code> 145 * @return the ASN.1 DER encoded bytes of the <code>qualifier</code>
|
/libcore/ojluni/src/main/java/javax/net/ssl/ |
H A D | SNIServerName.java | 52 // the encoded value of the server name 53 private final byte[] encoded; field in class:SNIServerName 60 * encoded value. 62 * Note that the {@code encoded} byte array is cloned to protect against 67 * @param encoded 68 * the encoded value of the server name 72 * @throws NullPointerException if {@code encoded} is null 74 protected SNIServerName(int type, byte[] encoded) { argument 84 if (encoded == null) { 86 "Server name encoded valu [all...] |
H A D | SNIHostName.java | 46 * understood by the client. The encoded server name value of a hostname is 69 * the encoded server name value of a hostname is 112 * Creates an {@code SNIHostName} using the specified encoded value. 114 * This method is normally used to parse the encoded name value in a 118 * the encoded name value of a hostname is 122 * the encoded hostname is represented as a byte string using UTF-8 124 * that the charset of {@code encoded} argument can be 127 * to translate the {@code encoded} argument into ASCII Compatible 131 * the encoded name value in a requested SNI extension. Otherwise, to 138 * for {@code encoded} argumen 162 SNIHostName(byte[] encoded) argument [all...] |
/libcore/ojluni/src/main/java/sun/security/ec/ |
H A D | ECPrivateKeyImpl.java | 56 * require that the parameters are encoded as part of the AlgorithmIdentifier, 73 public ECPrivateKeyImpl(byte[] encoded) throws InvalidKeyException { argument 74 decode(encoded); 147 + "encoded in the algorithm identifier");
|
H A D | ECPublicKeyImpl.java | 67 public ECPublicKeyImpl(byte[] encoded) throws InvalidKeyException { argument 68 decode(encoded); 86 // Internal API to get the encoded point. Currently used by SunPKCS11.
|
H A D | NamedCurve.java | 53 // encoded form (as NamedCurve identified via OID) 54 private final byte[] encoded; field in class:NamedCurve 64 encoded = out.toByteArray(); 96 return encoded.clone();
|
/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...] |
H A D | TestCertUtils.java | 151 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/test/java/org/apache/harmony/security/tests/java/security/ |
H A D | KeyRepTest.java | 162 public KeyRepChild(KeyRep.Type type, String algorithm, String format, byte[] encoded) { argument 163 super(type, algorithm, format, encoded);
|
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/ojluni/src/main/java/javax/crypto/ |
H A D | EncryptedPrivateKeyInfo.java | 66 // the ASN.1 encoded contents of this class 67 private byte[] encoded = null; field in class:EncryptedPrivateKeyInfo 72 * @param encoded the ASN.1 encoding of this object. The contents of 74 * @exception NullPointerException if the <code>encoded</code> is null. 77 public EncryptedPrivateKeyInfo(byte[] encoded) argument 79 if (encoded == null) { 80 throw new NullPointerException("the encoded parameter " + 83 this.encoded = (byte[])encoded.clone(); 84 DerValue val = new DerValue(this.encoded); [all...] |
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
H A D | X509CertificatePair.java | 80 private byte[] encoded; field in class:X509CertificatePair 118 private X509CertificatePair(byte[] encoded) throws CertificateException { argument 120 parse(new DerValue(encoded)); 121 this.encoded = encoded; 140 (byte[] encoded) throws CertificateException { 141 Object key = new Cache.EqualByteArray(encoded); 146 pair = new X509CertificatePair(encoded); 147 key = new Cache.EqualByteArray(pair.encoded); 187 * Return the DER encoded for 139 generateCertificatePair(byte[] encoded) argument [all...] |
/libcore/luni/src/test/java/libcore/java/net/ |
H A D | UrlEncodingTest.java | 255 * Asserts that {@code original} encodes to {@code encoded} using both URI 258 private void assertEncoded(String encoded, String original) throws Exception { argument 259 assertEquals(encoded, URLEncoder.encode(original, "UTF-8")); 260 assertEquals(encoded, URLEncoder.encode(original)); 261 assertEquals(encoded, new URI("http", "foo", "/", original).getRawFragment()); 264 private void assertRoundTrip(String original, String encoded) throws Exception { argument 265 assertEquals(encoded, URLEncoder.encode(original, "UTF-8")); 266 assertEquals(original, URLDecoder.decode(encoded, "UTF-8"));
|
/libcore/luni/src/test/java/libcore/java/security/spec/ |
H A D | AlgorithmParametersPSSTest.java | 36 // ASN.1 DER-encoded forms of DEFAULT_SPEC, WEIRD_SPEC, and WEIRD2_SPEC were generated using 114 byte[] encoded, PSSParameterSpec expected) throws Exception { 116 params.init(encoded); 120 params.init(encoded, "ASN.1"); 145 byte[] encoded = params.getEncoded("ASN.1"); 146 assertTrue(Arrays.equals(expectedEncoded, encoded)); 148 assertTrue(Arrays.equals(encoded, params.getEncoded())); 210 private static final byte[] hexDecode(String encoded) { argument 211 return HexEncoding.decode(encoded.toCharArray(), false); 113 assertInitWithDerEncoded( byte[] encoded, PSSParameterSpec expected) argument
|
/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/ojluni/src/main/java/sun/security/ssl/ |
H A D | JsseJce.java | 387 static ECPoint decodePoint(byte[] encoded, EllipticCurve curve) argument 389 return ECParameters.decodePoint(encoded, curve);
|
/libcore/luni/src/test/java/libcore/javax/net/ssl/ |
H A D | DefaultHostnameVerifierTest.java | 448 X509Certificate parseCertificate(String encoded) throws Exception { argument 449 InputStream in = new ByteArrayInputStream(encoded.getBytes(StandardCharsets.US_ASCII));
|
/libcore/ojluni/src/main/java/sun/security/x509/ |
H A D | X500Name.java | 87 * <li>attribute values encoded in different types (e.g., 139 private byte[] encoded; field in class:X500Name 290 * Constructs a name from an ASN.1 encoded value. The encoding 293 * @param value a DER-encoded value holding an X.500 name. 302 * Constructs a name from an ASN.1 encoded input stream. The encoding 305 * @param in DER-encoded data holding an X.500 name. 312 * Constructs a name from an ASN.1 encoded byte array. 314 * @param name DER-encoded byte array holding an X.500 name. 811 * Encodes the name in DER-encoded form. 814 * @param out where to put the DER-encoded [all...] |
H A D | X509CertImpl.java | 182 * Unmarshals a certificate from its encoded form, parsing the 183 * encoded bytes. This form of constructor is used by agents which 190 * @param certData the encoded bytes, with no trailing padding. 204 * certificate is RFC1421 hex-encoded, then it must begin with 209 * be either DER-encoded or RFC1421 hex-encoded version of the 210 * DER-encoded certificate. 219 // First try reading stream as HEX-encoded DER-encoded bytes, 226 // Next, try reading stream as raw DER-encoded byte 325 X509CertImpl(DerValue derVal, byte[] encoded) argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/auth/x500/ |
H A D | X500PrincipalTest.java | 606 * gets encoded form 635 * gets encoded form 835 * gets encoded form 853 * gets encoded form 871 * gets encoded form 2553 byte[] encoded = (byte[]) obj[4]; 2593 if (encoded != null) { 2594 if (!Arrays.equals(encoded, p.getEncoded())) { 2977 byte[] encoded = (byte[]) values[0]; 2985 p = new X500Principal(encoded); 3045 add(String param, String rfc2253, String rfc1779, byte[] encoded) argument 3051 add(String param, String rfc2253, String rfc1779, byte[] encoded, byte mask) argument 3057 add(String param, String rfc2253, String rfc1779, String canonical, byte[] encoded) argument 3063 add(String param, String rfc2253, String rfc1779, String canonical, byte[] encoded, byte mask) argument [all...] |