/dalvik/libcore/security/src/main/java/org/bouncycastle/asn1/ |
D | DERInputStream.java | 73 byte[] bytes) in readFully() argument 76 int left = bytes.length; in readFully() 85 int l = read(bytes, bytes.length - left, left); in readFully() 102 byte[] bytes) in buildObject() argument 110 ByteArrayInputStream bIn = new ByteArrayInputStream(bytes); in buildObject() 128 bIn = new ByteArrayInputStream(bytes); in buildObject() 148 return DERBoolean.getInstance(bytes); in buildObject() 151 return new DERInteger(bytes); in buildObject() 153 return new DEREnumerated(bytes); in buildObject() 155 return new DERObjectIdentifier(bytes); in buildObject() [all …]
|
D | DERInteger.java | 9 byte[] bytes; field in DERInteger 56 bytes = BigInteger.valueOf(value).toByteArray(); in DERInteger() 62 bytes = value.toByteArray(); in DERInteger() 66 byte[] bytes) in DERInteger() argument 68 this.bytes = bytes; in DERInteger() 73 return new BigInteger(bytes); in getValue() 82 return new BigInteger(1, bytes); in getPositiveValue() 89 out.writeEncoded(INTEGER, bytes); in encode() 96 for (int i = 0; i != bytes.length; i++) in hashCode() 98 value ^= (bytes[i] & 0xff) << (i % 4); in hashCode() [all …]
|
D | DEREnumerated.java | 9 byte[] bytes; field in DEREnumerated 56 bytes = BigInteger.valueOf(value).toByteArray(); in DEREnumerated() 62 bytes = value.toByteArray(); in DEREnumerated() 66 byte[] bytes) in DEREnumerated() argument 68 this.bytes = bytes; in DEREnumerated() 73 return new BigInteger(bytes); in getValue() 80 out.writeEncoded(ENUMERATED, bytes); in encode() 93 if (bytes.length != other.bytes.length) in equals() 98 for (int i = 0; i != bytes.length; i++) in equals() 100 if (bytes[i] != other.bytes[i]) in equals()
|
D | ASN1InputStream.java | 126 byte[] bytes) in readFully() argument 129 int left = bytes.length; in readFully() 137 while ((len = read(bytes, bytes.length - left, left)) > 0) in readFully() 158 byte[] bytes) in buildObject() argument 163 return new DERApplicationSpecific(tag, bytes); in buildObject() 173 ASN1InputStream aIn = new ASN1InputStream(bytes); in buildObject() 186 aIn = new ASN1InputStream(bytes); in buildObject() 200 return DERBoolean.getInstance(bytes); in buildObject() 203 return new DERInteger(bytes); in buildObject() 205 return new DEREnumerated(bytes); in buildObject() [all …]
|
D | DERBitString.java | 69 int bytes = 4; in getBytes() local 76 bytes--; in getBytes() 79 byte[] result = new byte[bytes]; in getBytes() 80 for (int i = 0; i < bytes; i++) in getBytes() 103 byte[] bytes = ((ASN1OctetString)obj).getOctets(); in getInstance() 104 int padBits = bytes[0]; in getInstance() 105 byte[] data = new byte[bytes.length - 1]; in getInstance() 107 System.arraycopy(bytes, 1, data, 0, bytes.length - 1); in getInstance() 213 byte[] bytes = new byte[getBytes().length + 1]; in encode() 215 bytes[0] = (byte)getPadBits(); in encode() [all …]
|
D | DERTaggedObject.java | 60 byte[] bytes = bOut.toByteArray(); in encode() 64 out.writeEncoded(CONSTRUCTED | TAGGED | tagNo, bytes); in encode() 71 if ((bytes[0] & CONSTRUCTED) != 0) in encode() 73 bytes[0] = (byte)(CONSTRUCTED | TAGGED | tagNo); in encode() 77 bytes[0] = (byte)(TAGGED | tagNo); in encode() 80 out.write(bytes); in encode()
|
/dalvik/libcore/security/src/main/java/org/bouncycastle/util/ |
D | Strings.java | 8 public static String fromUTF8ByteArray(byte[] bytes) in fromUTF8ByteArray() argument 13 while (i < bytes.length) in fromUTF8ByteArray() 16 if ((bytes[i] & 0xf0) == 0xf0) in fromUTF8ByteArray() 22 else if ((bytes[i] & 0xe0) == 0xe0) in fromUTF8ByteArray() 26 else if ((bytes[i] & 0xc0) == 0xc0) in fromUTF8ByteArray() 41 while (i < bytes.length) in fromUTF8ByteArray() 45 if ((bytes[i] & 0xf0) == 0xf0) in fromUTF8ByteArray() 47 …int codePoint = ((bytes[i] & 0x0F) << 18) | ((bytes[i+1] & 0x3F) << 12) | ((bytes[i+2] & 0x3F) << … in fromUTF8ByteArray() 55 else if ((bytes[i] & 0xe0) == 0xe0) in fromUTF8ByteArray() 57 ch = (char)(((bytes[i] & 0x1f) << 12) in fromUTF8ByteArray() [all …]
|
D | BigIntegers.java | 19 byte[] bytes = value.toByteArray(); in asUnsignedByteArray() 21 if (bytes[0] == 0) in asUnsignedByteArray() 23 byte[] tmp = new byte[bytes.length - 1]; in asUnsignedByteArray() 25 System.arraycopy(bytes, 1, tmp, 0, tmp.length); in asUnsignedByteArray() 30 return bytes; in asUnsignedByteArray()
|
/dalvik/libcore/nio/src/main/java/java/nio/ |
D | HeapByteBuffer.java | 165 int bytes = 0; in loadInt() local 168 bytes = bytes << 8; in loadInt() 169 bytes = bytes | (backingArray[baseOffset + i] & 0xFF); in loadInt() 173 bytes = bytes << 8; in loadInt() 174 bytes = bytes | (backingArray[baseOffset + i] & 0xFF); in loadInt() 177 return bytes; in loadInt() 182 long bytes = 0; in loadLong() local 185 bytes = bytes << 8; in loadLong() 186 bytes = bytes | (backingArray[baseOffset + i] & 0xFF); in loadLong() 190 bytes = bytes << 8; in loadLong() [all …]
|
/dalvik/libcore/security/src/main/java/org/apache/harmony/security/asn1/ |
D | BitString.java | 44 public final byte[] bytes; field in BitString 59 public BitString(byte[] bytes, int unusedBits) { in BitString() argument 67 if (bytes.length == 0 && unusedBits != 0) { in BitString() 72 this.bytes = bytes; in BitString() 87 bytes = new byte[size]; in BitString() 96 return (bytes[index] & SET_MASK[offset]) != 0; in getBit() 103 bytes[index] |= SET_MASK[offset]; in setBit() 105 bytes[index] &= RESET_MASK[offset]; in setBit() 110 boolean[] result = new boolean[bytes.length * 8 - unusedBits]; in toBooleanArray()
|
/dalvik/libcore/luni/src/main/java/java/io/ |
D | InputStreamReader.java | 53 ByteBuffer bytes = ByteBuffer.allocate(BUFFER_SIZE); field in InputStreamReader 73 bytes.limit(0); in InputStreamReader() 106 bytes.limit(0); in InputStreamReader() 123 bytes.limit(0); in InputStreamReader() 141 bytes.limit(0); in InputStreamReader() 258 boolean needInput = !bytes.hasRemaining(); in read() 268 int to_read = bytes.capacity() - bytes.limit(); in read() 269 int off = bytes.arrayOffset() + bytes.limit(); in read() 270 int was_red = in.read(bytes.array(), off, to_read); in read() 278 bytes.limit(bytes.limit() + was_red); in read() [all …]
|
/dalvik/dx/src/com/android/dx/cf/direct/ |
D | DirectClassFile.java | 80 private final ByteArray bytes; field in DirectClassFile 173 public DirectClassFile(ByteArray bytes, String filePath, in DirectClassFile() argument 175 if (bytes == null) { in DirectClassFile() 184 this.bytes = bytes; in DirectClassFile() 200 public DirectClassFile(byte[] bytes, String filePath, in DirectClassFile() argument 202 this(new ByteArray(bytes), filePath, strictParse); in DirectClassFile() 233 return bytes; in getBytes() 336 return new DcfTypeList(bytes, offset, size, pool, observer); in makeTypeList() 346 return bytes.getInt(0); in getMagic0() 356 return bytes.getUnsignedShort(4); in getMinorVersion0() [all …]
|
D | StdAttributeFactory.java | 218 ByteArray bytes = cf.getBytes(); in code() local 220 int maxStack = bytes.getUnsignedShort(offset); // u2 max_stack in code() 221 int maxLocals = bytes.getUnsignedShort(offset + 2); // u2 max_locals in code() 222 int codeLength = bytes.getInt(offset + 4); // u4 code_length in code() 226 observer.parsed(bytes, offset, 2, in code() 228 observer.parsed(bytes, offset + 2, 2, in code() 230 observer.parsed(bytes, offset + 4, 4, in code() 245 new BytecodeArray(bytes.slice(codeOffset, codeOffset + codeLength), in code() 252 int exceptionTableLength = bytes.getUnsignedShort(offset); in code() 258 observer.parsed(bytes, offset, 2, in code() [all …]
|
D | MemberListParser.java | 118 ByteArray bytes = cf.getBytes(); in getCount() local 119 return bytes.getUnsignedShort(offset); in getCount() 177 ByteArray bytes = cf.getBytes(); in parse() local 181 observer.parsed(bytes, offset, 2, in parse() 187 int accessFlags = bytes.getUnsignedShort(at); in parse() 188 int nameIdx = bytes.getUnsignedShort(at + 2); in parse() 189 int descIdx = bytes.getUnsignedShort(at + 4); in parse() 194 observer.startParsingMember(bytes, at, name.getString(), in parse() 196 observer.parsed(bytes, at, 0, "\n" + humanName() + in parse() 199 observer.parsed(bytes, at, 2, in parse() [all …]
|
/dalvik/libcore/nio/src/main/java/org/apache/harmony/nio/internal/ |
D | IOUtil.java | 63 public static int readInputStreamReader(InputStream in, ByteBuffer bytes, in readInputStreamReader() argument 69 fillBuf(in, bytes, chars, decoder); in readInputStreamReader() 85 InputStream in, ByteBuffer bytes, CharBuffer chars, in readInputStreamReader() argument 95 fillBuf(in, bytes, chars, decoder); in readInputStreamReader() 110 fillBuf(in, bytes, chars, decoder); in readInputStreamReader() 130 private static void fillBuf(InputStream in, ByteBuffer bytes, in fillBuf() argument 135 read = in.read(bytes.array()); in fillBuf() 144 bytes.limit(read); in fillBuf() 146 CoderResult result = decoder.decode(bytes, chars, endOfInput); in fillBuf() 150 bytes.clear(); in fillBuf() [all …]
|
/dalvik/dx/src/com/android/dx/rop/cst/ |
D | CstUtf8.java | 36 private final ByteArray bytes; field in CstUtf8 48 byte[] bytes = new byte[len * 3]; // Avoid having to reallocate. in stringToUtf8Bytes() 54 bytes[outAt] = (byte) c; in stringToUtf8Bytes() 57 bytes[outAt] = (byte) (((c >> 6) & 0x1f) | 0xc0); in stringToUtf8Bytes() 58 bytes[outAt + 1] = (byte) ((c & 0x3f) | 0x80); in stringToUtf8Bytes() 61 bytes[outAt] = (byte) (((c >> 12) & 0x0f) | 0xe0); in stringToUtf8Bytes() 62 bytes[outAt + 1] = (byte) (((c >> 6) & 0x3f) | 0x80); in stringToUtf8Bytes() 63 bytes[outAt + 2] = (byte) ((c & 0x3f) | 0x80); in stringToUtf8Bytes() 69 System.arraycopy(bytes, 0, result, 0, outAt); in stringToUtf8Bytes() 79 public static String utf8BytesToString(ByteArray bytes) { in utf8BytesToString() argument [all …]
|
/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/ |
D | PBEParametersGenerator.java | 104 byte[] bytes = new byte[password.length]; in PKCS5PasswordToBytes() 106 for (int i = 0; i != bytes.length; i++) in PKCS5PasswordToBytes() 108 bytes[i] = (byte)password[i]; in PKCS5PasswordToBytes() 111 return bytes; in PKCS5PasswordToBytes() 128 byte[] bytes = new byte[(password.length + 1) * 2]; in PKCS12PasswordToBytes() 132 bytes[i * 2] = (byte)(password[i] >>> 8); in PKCS12PasswordToBytes() 133 bytes[i * 2 + 1] = (byte)password[i]; in PKCS12PasswordToBytes() 136 return bytes; in PKCS12PasswordToBytes()
|
/dalvik/libcore/luni/src/main/java/org/apache/harmony/luni/net/ |
D | NetUtil.java | 96 static void intToBytes(int value, byte bytes[], int start) { in intToBytes() argument 101 bytes[start] = (byte) ((value >> 24) & 255); in intToBytes() 102 bytes[start + 1] = (byte) ((value >> 16) & 255); in intToBytes() 103 bytes[start + 2] = (byte) ((value >> 8) & 255); in intToBytes() 104 bytes[start + 3] = (byte) (value & 255); in intToBytes() 107 static int bytesToInt(byte bytes[], int start) { in bytesToInt() argument 114 int value = ((bytes[start + 3] & 255)) | ((bytes[start + 2] & 255) << 8) in bytesToInt() 115 | ((bytes[start + 1] & 255) << 16) | ((bytes[start] & 255) << 24); in bytesToInt()
|
/dalvik/dx/src/com/android/dx/util/ |
D | ByteArray.java | 31 private final byte[] bytes; field in ByteArray 48 public ByteArray(byte[] bytes, int start, int end) { in ByteArray() argument 49 if (bytes == null) { in ByteArray() 61 if (end > bytes.length) { in ByteArray() 65 this.bytes = bytes; in ByteArray() 75 public ByteArray(byte[] bytes) { in ByteArray() argument 76 this(bytes, 0, bytes.length); in ByteArray() 98 return new ByteArray(bytes, start + this.start, end + this.start); in slice() 111 public int underlyingOffset(int offset, byte[] bytes) { in underlyingOffset() argument 112 if (bytes != this.bytes) { in underlyingOffset() [all …]
|
/dalvik/dx/src/com/android/dx/cf/cst/ |
D | ConstantPoolParser.java | 45 private final ByteArray bytes; field in ConstantPoolParser 68 public ConstantPoolParser(ByteArray bytes) { in ConstantPoolParser() argument 69 int size = bytes.getUnsignedShort(8); // constant_pool_count in ConstantPoolParser() 71 this.bytes = bytes; in ConstantPoolParser() 123 observer.parsed(bytes, 8, 2, in parse() 125 observer.parsed(bytes, 10, 0, "\nconstant_pool:"); in parse() 151 observer.parsed(bytes, offset, nextOffset - offset, in parse() 156 observer.parsed(bytes, endOffset, 0, "end constant_pool"); in parse() 169 int tag = bytes.getUnsignedByte(at); in determineOffsets() 195 at += bytes.getUnsignedShort(at + 1) + 3; in determineOffsets() [all …]
|
/dalvik/dx/src/com/android/dx/command/dump/ |
D | ClassDumper.java | 40 public static void dump(byte[] bytes, PrintStream out, in dump() argument 43 new ClassDumper(bytes, out, filePath, args); in dump() 51 private ClassDumper(byte[] bytes, PrintStream out, in ClassDumper() argument 53 super(bytes, out, filePath, args); in ClassDumper() 60 byte[] bytes = getBytes(); in dump() 61 ByteArray ba = new ByteArray(bytes); in dump() 70 if (at != bytes.length) { in dump() 71 parsed(ba, at, bytes.length - at, "<extra data at end of file>"); in dump()
|
D | BlockDumper.java | 82 public static void dump(byte[] bytes, PrintStream out, in dump() argument 85 new BlockDumper(bytes, out, filePath, in dump() 94 BlockDumper(byte[] bytes, PrintStream out, in BlockDumper() argument 97 super(bytes, out, filePath, args); in BlockDumper() 110 byte[] bytes = getBytes(); in dump() 111 ByteArray ba = new ByteArray(bytes); in dump() 139 public void parsed(ByteArray bytes, int offset, int len, String human) { in parsed() argument 141 super.parsed(bytes, offset, len, human); in parsed() 155 public void startParsingMember(ByteArray bytes, int offset, String name, in startParsingMember() argument 167 setAt(bytes, offset); in startParsingMember() [all …]
|
/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/engines/ |
D | AESLightEngine.java | 319 byte[] bytes, in unpackBlock() argument 324 C0 = (bytes[index++] & 0xff); in unpackBlock() 325 C0 |= (bytes[index++] & 0xff) << 8; in unpackBlock() 326 C0 |= (bytes[index++] & 0xff) << 16; in unpackBlock() 327 C0 |= bytes[index++] << 24; in unpackBlock() 329 C1 = (bytes[index++] & 0xff); in unpackBlock() 330 C1 |= (bytes[index++] & 0xff) << 8; in unpackBlock() 331 C1 |= (bytes[index++] & 0xff) << 16; in unpackBlock() 332 C1 |= bytes[index++] << 24; in unpackBlock() 334 C2 = (bytes[index++] & 0xff); in unpackBlock() [all …]
|
D | AESFastEngine.java | 752 byte[] bytes, in unpackBlock() argument 757 C0 = (bytes[index++] & 0xff); in unpackBlock() 758 C0 |= (bytes[index++] & 0xff) << 8; in unpackBlock() 759 C0 |= (bytes[index++] & 0xff) << 16; in unpackBlock() 760 C0 |= bytes[index++] << 24; in unpackBlock() 762 C1 = (bytes[index++] & 0xff); in unpackBlock() 763 C1 |= (bytes[index++] & 0xff) << 8; in unpackBlock() 764 C1 |= (bytes[index++] & 0xff) << 16; in unpackBlock() 765 C1 |= bytes[index++] << 24; in unpackBlock() 767 C2 = (bytes[index++] & 0xff); in unpackBlock() [all …]
|
D | AESEngine.java | 421 byte[] bytes, in unpackBlock() argument 426 C0 = (bytes[index++] & 0xff); in unpackBlock() 427 C0 |= (bytes[index++] & 0xff) << 8; in unpackBlock() 428 C0 |= (bytes[index++] & 0xff) << 16; in unpackBlock() 429 C0 |= bytes[index++] << 24; in unpackBlock() 431 C1 = (bytes[index++] & 0xff); in unpackBlock() 432 C1 |= (bytes[index++] & 0xff) << 8; in unpackBlock() 433 C1 |= (bytes[index++] & 0xff) << 16; in unpackBlock() 434 C1 |= bytes[index++] << 24; in unpackBlock() 436 C2 = (bytes[index++] & 0xff); in unpackBlock() [all …]
|