Commit Graph

5 Commits

Author SHA1 Message Date
Doug Zongker
b7cc1ec723 a new java implementation of base64 for android-common
A new Base64 encoder/decoder class.  Some benchmarks comparing the
decoder it to those from android.os.Base64Utils (a decode-only native
implementation not accessible to apps) and
org.apache.commons.codec.binary.Base64, all with the JIT enabled:

  1k encoded data
  APACHE   avg:   811 us    min:   244 us    max: 13671 us
  COMMON   avg:   263 us    min:    30 us    max:  4730 us
  NATIVE   avg:   102 us    min:    61 us    max:  5493 us

  10k encoded data
  APACHE   avg:  3624 us    min:  2746 us    max: 23895 us
  COMMON   avg:   979 us    min:   518 us    max:  7751 us
  NATIVE   avg:   817 us    min:   762 us    max:  3143 us

  100k encoded data
  APACHE   avg: 33167 us    min: 31829 us    max: 140411 us
  COMMON   avg:  6047 us    min:  5493 us    max: 45227 us
  NATIVE   avg: 10109 us    min: 10009 us    max: 12451 us

Change-Id: Ic622e3a967a62d57d30bd25b80cbe4e0dd60e764
2010-02-04 15:54:00 -08:00
Makoto Onuki
1b925b0998 Addign more tests for DomainNameValidator.
Added tests that use actual certificates.

See bug:2369689 for background.
2010-01-19 15:03:10 -08:00
Makoto Onuki
831f258fd9 Moved DomainNameChecker to android common.
- Moved DomainNameChecker from android.net.http to android common, and renamed to DomainNameValidator.
- Added a simplified version of DNParser, which DomainNameValidator uses instead of X509Name in order to extract Subject Name from a certificate.
- Added unit tests for DomainNameChecker and DNParser.

There's a suspicious comment in DomainNameChecker saying something like "X509Certificate fails to parse a certificate when a subject alt name begins with '*'".  I think we should fix it if it's really the case -- otherwise certificates with the wildcard wouldn't work.  I'll see if it's true after submitting this patch.
2010-01-12 10:27:13 -08:00
Dan Egnor
a649612e68 Add OperationScheduler (and test) to the common static library;
includes new string parsing function (and test).
2009-11-21 10:09:46 -08:00
Dan Egnor
a6f4698289 Create android-common static library which gets included in frameworks.jar,
but can also be used by unbundled apps.  Move android.text.util.Regex there as
a starting example, renamed to a more sensible (?) com.android.common.Patterns.
Set up a corresponding test package, and move RegexTest (to PatternsTest).
Update clients.
2009-11-18 12:05:04 -08:00