Lines Matching refs:encoding

60     private byte[] encoding = null;
75 * New version use the new filed "encoding" only.
80 * 2. old -> new: There's no "encoding" field, new readObject() reads
82 * 3. new -> new: "encoding" field exists, new readObject() uses it
113 if (encoding == null) { // from an old version
200 encoding = new byte[pos];
201 System.arraycopy(tmp, 0, encoding, 0, pos);
228 * The encoding of the ID in the stream uses "DER", a BER/1 subset.
244 * one byte of encoding. Verify that the tag of this datum
247 * Then get and check the length of the ID's encoding. We set
258 encoding = new byte[in.getLength()];
259 in.getBytes(encoding);
260 check(encoding);
271 encoding = new byte[in.available()];
272 in.getBytes(encoding);
273 check(encoding);
291 encoding = new byte[pos];
292 System.arraycopy(tmp, 0, encoding, 0, pos);
318 out.write (DerValue.tag_ObjectId, encoding);
343 return Arrays.equals(encoding, other.encoding);
348 return Arrays.hashCode(encoding);
358 int length = encoding.length;
363 if ((encoding[i] & 0x80) == 0) {
366 BigInteger big = new BigInteger(pack(encoding, fromPos, i-fromPos+1, 7, 8));
386 byte tmp = encoding[j];
420 int length = encoding.length;
425 if ((encoding[i] & 0x80) == 0) {
431 BigInteger big = new BigInteger(pack(encoding, fromPos, i-fromPos+1, 7, 8));
444 byte tmp = encoding[j];
570 * Pack the int into a OID sub-identifier DER encoding
582 * Pack the BigInteger into a OID subidentifier DER encoding
598 * Check the DER encoding. Since DER encoding defines that the integer bits
601 private static void check(byte[] encoding) throws IOException {
602 int length = encoding.length;
604 (encoding[length - 1] & 0x80) != 0) { // not ended
606 "Invalid DER encoding, not ended");
610 if (encoding[i] == (byte)0x80 &&
611 (i==0 || (encoding[i-1] & 0x80) == 0)) {
613 "Invalid DER encoding, useless extra octet detected");