You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Miguel Montes <mi...@gmail.com> on 2006/03/14 16:31:00 UTC

ITC: Contribution of java.math and javax.crypto

 As it was announced by Iris Gastañaga we are contributing the packages
javax.crypto and java.math on behalf of ITC (Córdoba Technolgy Institute).
We have been developing this code for several months and we believe it is a
valid contribution. Our code not only implements the full 5.0 API but also
uses 5.0 features and syntax.  As 5.0 is a stated goal of Harmony we hope
that a 5.0 VM will be available soon.
We are also contributing a set of test cases for both packages.

Below there is a short description of the contribution.  We will soon
contribute also  an implementation of java.rmi.



 *Package name*
**javax.crypto
*
Package Description*
This is a clean room implementation of the package javax.crypto as specified
in the JDK 5.0. It requires the existence of other java packages, in
particular java.security and java.util. It can be used to replace jce.jar in
the jdk.

*Current Status*
The package is almost fully implemented. It does not implement the
ExemptionMechanism logic.

*Testing
* Unit and integration tests (and their documentation) are provided with the
code.*
*

*Implementation Notes
The code uses heavily J2SE 5.0 features, such as generics, so it requires
5.0 VM and libraries (for instance java.security).
It has been tested against Sun SDK, removing the original jce.jar and
replacing it by ours.

*




 *Package name*
**java.math

 *Package Description*
This is a clean room implementation of the package java.math as specified in
JDK 5.0.

*Current Status*
The package is fully implemented.  Some methods are fairly optimized (for
example multiplication combines paper-and-pencil and Karatsuba algorithms).

*Testing
* Unit and integration tests (and their documentation) are provided with the
code.*
*

*Implementation Notes
The internal representation for BigInteger is two-complement (this is
different from the sign-magnitude implementation already donated to
Harmony). BigDecimal uses only BigInteger's public interface and implements
the full 5.0 specification (which has about twice as many methods as in 1.4).
The code uses J2SE 5.0 features, so it requires 5.0 VM. It has been tested
against Sun SDK.

*
**




--
Miguel Montes

Re: keyword scanning (was: Re: ITC: Contribution of java.math and javax.crypto)

Posted by Alex Orlov <am...@gmail.com>.
:) Thanks for letting know this!

Thanks,
Alex Orlov.
Intel Middleware Products Division

On 4/7/06, Tim Ellison <t....@gmail.com> wrote:
> Thanks Alex,
>
> We already have a keyword scanner[1] so we should ensure your dictionary
> words are in there.
>
> I'd rather add the scan to the automated build rather than rely upon the
> committers to remember to run it (at least one of the committers is lazy
> like that ;-) )
>
> [1]
> http://svn.apache.org/viewcvs.cgi/incubator/harmony/standard/tools/keywordscan
>
> Regards,
> Tim
>
> Alex Orlov wrote:
> > On 4/7/06, Chris Gray <ch...@kiffer.be> wrote:
> >> On Thursday 06 April 2006 23:59, Tim Ellison wrote:
> >>> You can run the Eclipse IDE on Classpath or Harmony(*) class libraries,
> >>> both are sufficiently well advanced to run it.
> >>>
> >>> (*) you need to use the regex code from regex-beans-math which hasn't
> >>> been merged into the build process yet
> >> I knew eclipse ran on Classpath (e.g. gcj), wasn't sure about Harmony. That's
> >> good to hear.
> >>
> >> IMO Harmony developers should be encouraged to use a Sun-free workstation
> >> whenever possible, to avoid this kind of slip-up. There should also be
> >> automatic detectors for references to sun.* or com.sun.* classes.
> >
> > Hi folks,
> >
> > BTW we use simple script to check if the sources contain the words we
> > would like to avoid. You can find it attached. The usage is pretty
> > straightforward:
> >
> >   perl check_bad_words.pl <dictionary> <directory or file>
> >
> > Also attached is dictionary file that contains "Sun" and "GPL" as two
> > sample words. You can turn on your imagination and enhance the
> > dictionary significantly. :)
> >
> > May we propose the committers to run it before committing anyuthing to SVN?
> >
> > Thanks,
> > Alex Orlov.
> > Intel Middleware Products Division
> >
> >
> >> Regards,
> >>
> >> Chris
> >>
> >> --
> >> Chris Gray        /k/ Embedded Java Solutions      BE0503765045
> >> Embedded & Mobile Java, OSGi    http://www.k-embedded-java.com/
> >> chris.gray@kiffer.be                             +32 3 216 0369
> >>
> >>
> >> ---------------------------------------------------------------------
> >> Terms of use : http://incubator.apache.org/harmony/mailing.html
> >> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> >> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >>
> >>
> >>
> >> ------------------------------------------------------------------------
> >>
> >> #!/usr/bin/perl
> >>
> >> use File::Spec;
> >> use strict;
> >>
> >> my $ext_src = "java|c|h|cpp|hpp|j|jfl|ccode";
> >> my $ext_sup = "xml|txt|pl|sh|bat|cmd";
> >> my $ext = "(" . $ext_src . "|" . $ext_sup . ")";
> >> my $filename = "copyright|license|notice|readme";
> >> my %bad_words = ();
> >>
> >> sub readDictionary {
> >>      my ($dic) = @_;
> >>      if (-f $dic) {
> >>              open (FD_DIC, "< $dic") or die "Can't open dictionary file: $dic\n";
> >>              while (<FD_DIC>) {
> >>                      unless (/^#/ || /^\s+$/) {
> >>                              my ($word, $area) = split(" ; ");
> >>                              chomp $area;
> >>                              my @areas = split(":", $area);
> >>                              push @{$bad_words{$word}}, @areas;
> >>                      }
> >>              }
> >>              close(FD_DIC);
> >>      } else {
> >>              die "Invalid dictionary file: $dic\n";
> >>      }
> >> }
> >>
> >> sub readDir {
> >>      my ($file) = @_;
> >>      if (-d $file) {
> >>              if (opendir(FD_DIR, $file)) {
> >>                      chdir ($file);
> >>                      foreach my $item (readdir(FD_DIR)) {
> >>                              if ($item ne '.' && $item ne '..') {
> >>                                      readDir($item);
> >>                              }
> >>                      }
> >>                      chdir ("..");
> >>                      closedir (FD_DIR);
> >>              } else {
> >>                      print "Can't open dir $file\n";
> >>              }
> >>      } elsif (-f $file) {
> >>              if ($file =~ /\.$ext$/ || $file =~ /^$filename/i) {
> >>                      &searchBadWords(&readFile($file), $file);
> >>              }
> >>      } else {
> >>              print "File or directory doesn't exist: $file\n";
> >>      }
> >> }
> >>
> >> sub searchBadWords($$) {
> >>      my ($content, $file) = @_;
> >>         my ($prev, $after, $match, $area);
> >>      my $abs_fname = File::Spec->rel2abs($file);
> >>      foreach my $word (sort keys %bad_words) {
> >>              my $checkable = 0; # false
> >>              foreach $area (@{$bad_words{$word}}) {
> >>                      if (($area eq "all") or (index($abs_fname, $area) ne -1)) {
> >>                              $checkable = 1; # true
> >>                      }
> >>              }
> >>              if ($checkable) {
> >>                      if ($content =~ m/$word/i) {
> >>                              $match = $&;
> >>                              chomp($match);
> >>                              $prev = $`;
> >>                              $after = $';
> >>                              print "File: $abs_fname\n";
> >>                              print "Bad word: $match\n";
> >>                              print "Line #" . &getLineNumber($prev) . "\n";
> >>                              print "String: " . &getString($prev, $after, $match) . "\n";
> >>                              print "------------------------------------\n";
> >>                      }
> >>              }
> >>      }
> >>      if ($file =~ /^*\.($ext_src)/) {
> >>          if ($content =~ /[\s_]bug[\s_]*(#*)(\d+)/) {
> >>              $match = $&;
> >>              chomp($match);
> >>              $prev = $`;
> >>              $after = $';
> >>              print "File: $abs_fname\n";
> >>              print "Bug mentioning: $match\n";
> >>              print "Line #" . &getLineNumber($prev) . "\n";
> >>              print "String: " . &getString($prev, $after, $match) . "\n";
> >>              print "------------------------------------\n";
> >>          }
> >>      }
> >> }
> >>
> >> sub readFile($) {
> >>      my($file_name) = @_;
> >>      my $content = "";
> >>      if (open(FH, "< " . $file_name)) {
> >>              while (<FH>) {
> >>                      $content .= $_;
> >>              }
> >>              close FH;
> >>      } else {
> >>              printf STDERR "Can't open file $file_name\n";
> >>      }
> >>      $content;
> >> }
> >>
> >> sub getString($$$) {
> >>      my($prev, $after, $match) = @_;
> >>      my $last_p = rindex($prev, "\n");
> >>      my $first_a = index($after, "\n");
> >>      substr($prev, $last_p + 1, length($prev) - $last_p) . $match . substr($after, 0, $first_a);
> >> }
> >>
> >> sub getLineNumber($) {
> >>      my($string) = @_;
> >>      my $lnum = 1;
> >>      while ($string =~ m/\n/g) {
> >>              $lnum++;
> >>      }
> >>      $lnum;
> >> }
> >>
> >> if (scalar(@ARGV) < 2) {
> >>      print "Usage: perl check_bad_words.pl <dictionary> <directory or file>";
> >>      exit;
> >> }
> >>
> >> &readDictionary($ARGV[0]);
> >> &readDir($ARGV[1]);
> >>
> >>
> >> ------------------------------------------------------------------------
> >>
> >> ---------------------------------------------------------------------
> >> Terms of use : http://incubator.apache.org/harmony/mailing.html
> >> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> >> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


keyword scanning (was: Re: ITC: Contribution of java.math and javax.crypto)

Posted by Tim Ellison <t....@gmail.com>.
Thanks Alex,

We already have a keyword scanner[1] so we should ensure your dictionary
words are in there.

I'd rather add the scan to the automated build rather than rely upon the
committers to remember to run it (at least one of the committers is lazy
like that ;-) )

[1]
http://svn.apache.org/viewcvs.cgi/incubator/harmony/standard/tools/keywordscan

Regards,
Tim

Alex Orlov wrote:
> On 4/7/06, Chris Gray <ch...@kiffer.be> wrote:
>> On Thursday 06 April 2006 23:59, Tim Ellison wrote:
>>> You can run the Eclipse IDE on Classpath or Harmony(*) class libraries,
>>> both are sufficiently well advanced to run it.
>>>
>>> (*) you need to use the regex code from regex-beans-math which hasn't
>>> been merged into the build process yet
>> I knew eclipse ran on Classpath (e.g. gcj), wasn't sure about Harmony. That's
>> good to hear.
>>
>> IMO Harmony developers should be encouraged to use a Sun-free workstation
>> whenever possible, to avoid this kind of slip-up. There should also be
>> automatic detectors for references to sun.* or com.sun.* classes.
> 
> Hi folks,
> 
> BTW we use simple script to check if the sources contain the words we
> would like to avoid. You can find it attached. The usage is pretty
> straightforward:
> 
>   perl check_bad_words.pl <dictionary> <directory or file>
> 
> Also attached is dictionary file that contains "Sun" and "GPL" as two
> sample words. You can turn on your imagination and enhance the
> dictionary significantly. :)
> 
> May we propose the committers to run it before committing anyuthing to SVN?
> 
> Thanks,
> Alex Orlov.
> Intel Middleware Products Division
> 
> 
>> Regards,
>>
>> Chris
>>
>> --
>> Chris Gray        /k/ Embedded Java Solutions      BE0503765045
>> Embedded & Mobile Java, OSGi    http://www.k-embedded-java.com/
>> chris.gray@kiffer.be                             +32 3 216 0369
>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> #!/usr/bin/perl
>>
>> use File::Spec;
>> use strict;
>>
>> my $ext_src = "java|c|h|cpp|hpp|j|jfl|ccode";
>> my $ext_sup = "xml|txt|pl|sh|bat|cmd";
>> my $ext = "(" . $ext_src . "|" . $ext_sup . ")";
>> my $filename = "copyright|license|notice|readme";
>> my %bad_words = ();
>>
>> sub readDictionary {
>> 	my ($dic) = @_;
>> 	if (-f $dic) {
>> 		open (FD_DIC, "< $dic") or die "Can't open dictionary file: $dic\n";
>> 		while (<FD_DIC>) {
>> 			unless (/^#/ || /^\s+$/) {
>> 				my ($word, $area) = split(" ; ");
>> 				chomp $area;
>> 				my @areas = split(":", $area);
>> 				push @{$bad_words{$word}}, @areas;
>> 			}
>> 		}
>> 		close(FD_DIC);
>> 	} else {
>> 		die "Invalid dictionary file: $dic\n";
>> 	}
>> }
>>
>> sub readDir {
>> 	my ($file) = @_;
>> 	if (-d $file) {
>> 		if (opendir(FD_DIR, $file)) {
>> 			chdir ($file);
>> 			foreach my $item (readdir(FD_DIR)) {
>> 				if ($item ne '.' && $item ne '..') {
>> 					readDir($item);
>> 				}
>> 			}
>> 			chdir ("..");
>> 			closedir (FD_DIR);
>> 		} else {
>> 			print "Can't open dir $file\n";
>> 		}
>> 	} elsif (-f $file) {
>> 		if ($file =~ /\.$ext$/ || $file =~ /^$filename/i) {
>> 			&searchBadWords(&readFile($file), $file);
>> 		}
>> 	} else {
>> 		print "File or directory doesn't exist: $file\n";
>> 	}
>> }
>>
>> sub searchBadWords($$) {
>> 	my ($content, $file) = @_;
>>         my ($prev, $after, $match, $area);
>> 	my $abs_fname = File::Spec->rel2abs($file);
>> 	foreach my $word (sort keys %bad_words) {
>> 		my $checkable = 0; # false
>> 		foreach $area (@{$bad_words{$word}}) {
>> 			if (($area eq "all") or (index($abs_fname, $area) ne -1)) {
>> 				$checkable = 1; # true
>> 			}
>> 		}
>> 		if ($checkable) {
>> 			if ($content =~ m/$word/i) {
>> 				$match = $&;
>> 				chomp($match);
>> 				$prev = $`;
>> 				$after = $';
>> 				print "File: $abs_fname\n";
>> 				print "Bad word: $match\n";
>> 				print "Line #" . &getLineNumber($prev) . "\n";
>> 				print "String: " . &getString($prev, $after, $match) . "\n";
>> 				print "------------------------------------\n";
>> 			}	
>> 		}
>> 	}
>> 	if ($file =~ /^*\.($ext_src)/) {
>> 	    if ($content =~ /[\s_]bug[\s_]*(#*)(\d+)/) {
>> 	    	$match = $&;
>> 		chomp($match);
>> 		$prev = $`;
>> 		$after = $';
>> 		print "File: $abs_fname\n";
>> 		print "Bug mentioning: $match\n";
>> 		print "Line #" . &getLineNumber($prev) . "\n";
>> 		print "String: " . &getString($prev, $after, $match) . "\n";
>> 		print "------------------------------------\n";
>> 	    }
>> 	}
>> }
>>
>> sub readFile($) {
>> 	my($file_name) = @_;
>> 	my $content = "";	
>> 	if (open(FH, "< " . $file_name)) {
>> 		while (<FH>) {
>> 			$content .= $_;
>> 		}
>> 		close FH;
>> 	} else {
>> 		printf STDERR "Can't open file $file_name\n";
>> 	}
>> 	$content;
>> }
>>
>> sub getString($$$) {
>> 	my($prev, $after, $match) = @_;
>> 	my $last_p = rindex($prev, "\n");
>> 	my $first_a = index($after, "\n");
>> 	substr($prev, $last_p + 1, length($prev) - $last_p) . $match . substr($after, 0, $first_a);
>> }
>>
>> sub getLineNumber($) {
>> 	my($string) = @_;
>> 	my $lnum = 1;
>> 	while ($string =~ m/\n/g) {
>> 		$lnum++;
>> 	}
>> 	$lnum;
>> }
>>
>> if (scalar(@ARGV) < 2) {
>> 	print "Usage: perl check_bad_words.pl <dictionary> <directory or file>";
>> 	exit;
>> }
>>
>> &readDictionary($ARGV[0]);
>> &readDir($ARGV[1]);
>>
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: ITC: Contribution of java.math and javax.crypto

Posted by Alex Orlov <am...@gmail.com>.
On 4/7/06, Chris Gray <ch...@kiffer.be> wrote:
> On Thursday 06 April 2006 23:59, Tim Ellison wrote:
> > You can run the Eclipse IDE on Classpath or Harmony(*) class libraries,
> > both are sufficiently well advanced to run it.
> >
> > (*) you need to use the regex code from regex-beans-math which hasn't
> > been merged into the build process yet
>
> I knew eclipse ran on Classpath (e.g. gcj), wasn't sure about Harmony. That's
> good to hear.
>
> IMO Harmony developers should be encouraged to use a Sun-free workstation
> whenever possible, to avoid this kind of slip-up. There should also be
> automatic detectors for references to sun.* or com.sun.* classes.

Hi folks,

BTW we use simple script to check if the sources contain the words we
would like to avoid. You can find it attached. The usage is pretty
straightforward:

  perl check_bad_words.pl <dictionary> <directory or file>

Also attached is dictionary file that contains "Sun" and "GPL" as two
sample words. You can turn on your imagination and enhance the
dictionary significantly. :)

May we propose the committers to run it before committing anyuthing to SVN?

Thanks,
Alex Orlov.
Intel Middleware Products Division


>
> Regards,
>
> Chris
>
> --
> Chris Gray        /k/ Embedded Java Solutions      BE0503765045
> Embedded & Mobile Java, OSGi    http://www.k-embedded-java.com/
> chris.gray@kiffer.be                             +32 3 216 0369
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

Re: ITC: Contribution of java.math and javax.crypto

Posted by Chris Gray <ch...@kiffer.be>.
On Thursday 06 April 2006 23:59, Tim Ellison wrote:
> You can run the Eclipse IDE on Classpath or Harmony(*) class libraries,
> both are sufficiently well advanced to run it.
>
> (*) you need to use the regex code from regex-beans-math which hasn't
> been merged into the build process yet

I knew eclipse ran on Classpath (e.g. gcj), wasn't sure about Harmony. That's 
good to hear.

IMO Harmony developers should be encouraged to use a Sun-free workstation 
whenever possible, to avoid this kind of slip-up. There should also be 
automatic detectors for references to sun.* or com.sun.* classes.

Regards,

Chris

-- 
Chris Gray        /k/ Embedded Java Solutions      BE0503765045
Embedded & Mobile Java, OSGi    http://www.k-embedded-java.com/
chris.gray@kiffer.be                             +32 3 216 0369


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: ITC: Contribution of java.math and javax.crypto

Posted by Tim Ellison <t....@gmail.com>.
You can run the Eclipse IDE on Classpath or Harmony(*) class libraries,
both are sufficiently well advanced to run it.

(*) you need to use the regex code from regex-beans-math which hasn't
been merged into the build process yet

Regards,
Tim

Chris Gray wrote:
> On Thursday 06 April 2006 23:02, Miguel Montes wrote:
>> Hi Mikhail:
>> I'm glad that you are looking at our code.
>>
>> I'm afraid that the problem was caused by Eclipse's black magic. Searching
>> for a Base 64 decoder, the developer typed B ctrl+space, and the first
>> option was BASE64Decoder. We have even src.zip removed from the
>> workstations, so the absence of doc comments  was not a hint.
>> It was clearly a mistake, and we are working on fixing it. Thanks for
>> pointing at it.
>>
>> Miguel
> 
> Guess this is a good illustration of why being able to run eclipse on 
> Classpath or Harmony, and not install even a jre from Sun on the dev machine, 
> is / will be a Good Thing ...
> 
> Chris
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: ITC: Contribution of java.math and javax.crypto

Posted by Chris Gray <ch...@kiffer.be>.
On Thursday 06 April 2006 23:02, Miguel Montes wrote:
> Hi Mikhail:
> I'm glad that you are looking at our code.
>
> I'm afraid that the problem was caused by Eclipse's black magic. Searching
> for a Base 64 decoder, the developer typed B ctrl+space, and the first
> option was BASE64Decoder. We have even src.zip removed from the
> workstations, so the absence of doc comments  was not a hint.
> It was clearly a mistake, and we are working on fixing it. Thanks for
> pointing at it.
>
> Miguel

Guess this is a good illustration of why being able to run eclipse on 
Classpath or Harmony, and not install even a jre from Sun on the dev machine, 
is / will be a Good Thing ...

Chris

-- 
Chris Gray        /k/ Embedded Java Solutions      BE0503765045
Embedded & Mobile Java, OSGi    http://www.k-embedded-java.com/
chris.gray@kiffer.be                             +32 3 216 0369


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: ITC: Contribution of java.math and javax.crypto

Posted by Miguel Montes <mi...@gmail.com>.
Thanks for the tip, Tim. I think the set of access rules for 1.5 should be
pretty much the same

Miguel

On 4/6/06, Tim Ellison <t....@gmail.com> wrote:
>
> Miguel,
>
> You can set up Eclipse to avoid this problem by defining access rules
> that ensure you can only 'see' API packages.
>
> Take a look at:
>         https://bugs.eclipse.org/bugs/show_bug.cgi?id=116656
>         (contains an example for JDK 1.4.2 rules)
>
> Regards,
> Tim
>
>
> Miguel Montes wrote:
> > Hi Mikhail:
> > I'm glad that you are looking at our code.
> >
> > I'm afraid that the problem was caused by Eclipse's black magic.
> Searching
> > for a Base 64 decoder, the developer typed B ctrl+space, and the first
> > option was BASE64Decoder. We have even src.zip removed from the
> > workstations, so the absence of doc comments  was not a hint.
> > It was clearly a mistake, and we are working on fixing it. Thanks for
> > pointing at it.
> >
> > Miguel
> >
> >
> > On 4/6/06, Mikhail Loenko <ml...@gmail.com> wrote:
> >> Hello Miguel
> >>
> >> Thank you for your recent contribution to Harmony project!
> >>
> >> I've noticed that class javax.crypto.Util invokes a method
> >> from undocumented package sun.misc.*
> >>
> >> I assume that you did not have access to Sun sources, so it probably
> >> would be good if you provide a link to how did you learn about that
> Sun's
> >> internal functionality and its usage.
> >>
> >> Thanks,
> >> Mikhail
> >>
> >> 2006/3/14, Tim Ellison <t....@gmail.com>:
> >>> Excellent!  -- thanks Miguel and team.
> >>>
> >>> Regards,
> >>> Tim
> >>>
> >>> Miguel Montes wrote:
> >>>>  As it was announced by Iris Gastañaga we are contributing the
> >> packages
> >>>> javax.crypto and java.math on behalf of ITC (Córdoba Technolgy
> >> Institute).
> >>>> We have been developing this code for several months and we believe
> it
> >> is a
> >>>> valid contribution. Our code not only implements the full 5.0 API but
> >> also
> >>>> uses 5.0 features and syntax.  As 5.0 is a stated goal of Harmony we
> >> hope
> >>>> that a 5.0 VM will be available soon.
> >>>> We are also contributing a set of test cases for both packages.
> >>>>
> >>>> Below there is a short description of the contribution.  We will soon
> >>>> contribute also  an implementation of java.rmi.
> >>>>
> >>>>
> >>>>
> >>>>  *Package name*
> >>>> **javax.crypto
> >>>> *
> >>>> Package Description*
> >>>> This is a clean room implementation of the package javax.crypto as
> >> specified
> >>>> in the JDK 5.0. It requires the existence of other java packages, in
> >>>> particular java.security and java.util. It can be used to replace
> >> jce.jar in
> >>>> the jdk.
> >>>>
> >>>> *Current Status*
> >>>> The package is almost fully implemented. It does not implement the
> >>>> ExemptionMechanism logic.
> >>>>
> >>>> *Testing
> >>>> * Unit and integration tests (and their documentation) are provided
> >> with the
> >>>> code.*
> >>>> *
> >>>>
> >>>> *Implementation Notes
> >>>> The code uses heavily J2SE 5.0 features, such as generics, so it
> >> requires
> >>>> 5.0 VM and libraries (for instance java.security).
> >>>> It has been tested against Sun SDK, removing the original jce.jar and
> >>>> replacing it by ours.
> >>>>
> >>>> *
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>  *Package name*
> >>>> **java.math
> >>>>
> >>>>  *Package Description*
> >>>> This is a clean room implementation of the package java.math as
> >> specified in
> >>>> JDK 5.0.
> >>>>
> >>>> *Current Status*
> >>>> The package is fully implemented.  Some methods are fairly optimized
> >> (for
> >>>> example multiplication combines paper-and-pencil and Karatsuba
> >> algorithms).
> >>>> *Testing
> >>>> * Unit and integration tests (and their documentation) are provided
> >> with the
> >>>> code.*
> >>>> *
> >>>>
> >>>> *Implementation Notes
> >>>> The internal representation for BigInteger is two-complement (this is
> >>>> different from the sign-magnitude implementation already donated to
> >>>> Harmony). BigDecimal uses only BigInteger's public interface and
> >> implements
> >>>> the full 5.0 specification (which has about twice as many methods as
> >> in 1.4).
> >>>> The code uses J2SE 5.0 features, so it requires 5.0 VM. It has been
> >> tested
> >>>> against Sun SDK.
> >>>>
> >>>> *
> >>>> **
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Miguel Montes
> >>>>
> >>> --
> >>>
> >>> Tim Ellison (t.p.ellison@gmail.com)
> >>> IBM Java technology centre, UK.
> >>>
> >> ---------------------------------------------------------------------
> >> Terms of use : http://incubator.apache.org/harmony/mailing.html
> >> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> >> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >>
> >>
> >
> >
> > --
> > Miguel Montes
> >
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


--
Miguel Montes

Re: ITC: Contribution of java.math and javax.crypto

Posted by Tim Ellison <t....@gmail.com>.
Miguel,

You can set up Eclipse to avoid this problem by defining access rules
that ensure you can only 'see' API packages.

Take a look at:
	https://bugs.eclipse.org/bugs/show_bug.cgi?id=116656
	(contains an example for JDK 1.4.2 rules)

Regards,
Tim


Miguel Montes wrote:
> Hi Mikhail:
> I'm glad that you are looking at our code.
> 
> I'm afraid that the problem was caused by Eclipse's black magic. Searching
> for a Base 64 decoder, the developer typed B ctrl+space, and the first
> option was BASE64Decoder. We have even src.zip removed from the
> workstations, so the absence of doc comments  was not a hint.
> It was clearly a mistake, and we are working on fixing it. Thanks for
> pointing at it.
> 
> Miguel
> 
> 
> On 4/6/06, Mikhail Loenko <ml...@gmail.com> wrote:
>> Hello Miguel
>>
>> Thank you for your recent contribution to Harmony project!
>>
>> I've noticed that class javax.crypto.Util invokes a method
>> from undocumented package sun.misc.*
>>
>> I assume that you did not have access to Sun sources, so it probably
>> would be good if you provide a link to how did you learn about that Sun's
>> internal functionality and its usage.
>>
>> Thanks,
>> Mikhail
>>
>> 2006/3/14, Tim Ellison <t....@gmail.com>:
>>> Excellent!  -- thanks Miguel and team.
>>>
>>> Regards,
>>> Tim
>>>
>>> Miguel Montes wrote:
>>>>  As it was announced by Iris Gastañaga we are contributing the
>> packages
>>>> javax.crypto and java.math on behalf of ITC (Córdoba Technolgy
>> Institute).
>>>> We have been developing this code for several months and we believe it
>> is a
>>>> valid contribution. Our code not only implements the full 5.0 API but
>> also
>>>> uses 5.0 features and syntax.  As 5.0 is a stated goal of Harmony we
>> hope
>>>> that a 5.0 VM will be available soon.
>>>> We are also contributing a set of test cases for both packages.
>>>>
>>>> Below there is a short description of the contribution.  We will soon
>>>> contribute also  an implementation of java.rmi.
>>>>
>>>>
>>>>
>>>>  *Package name*
>>>> **javax.crypto
>>>> *
>>>> Package Description*
>>>> This is a clean room implementation of the package javax.crypto as
>> specified
>>>> in the JDK 5.0. It requires the existence of other java packages, in
>>>> particular java.security and java.util. It can be used to replace
>> jce.jar in
>>>> the jdk.
>>>>
>>>> *Current Status*
>>>> The package is almost fully implemented. It does not implement the
>>>> ExemptionMechanism logic.
>>>>
>>>> *Testing
>>>> * Unit and integration tests (and their documentation) are provided
>> with the
>>>> code.*
>>>> *
>>>>
>>>> *Implementation Notes
>>>> The code uses heavily J2SE 5.0 features, such as generics, so it
>> requires
>>>> 5.0 VM and libraries (for instance java.security).
>>>> It has been tested against Sun SDK, removing the original jce.jar and
>>>> replacing it by ours.
>>>>
>>>> *
>>>>
>>>>
>>>>
>>>>
>>>>  *Package name*
>>>> **java.math
>>>>
>>>>  *Package Description*
>>>> This is a clean room implementation of the package java.math as
>> specified in
>>>> JDK 5.0.
>>>>
>>>> *Current Status*
>>>> The package is fully implemented.  Some methods are fairly optimized
>> (for
>>>> example multiplication combines paper-and-pencil and Karatsuba
>> algorithms).
>>>> *Testing
>>>> * Unit and integration tests (and their documentation) are provided
>> with the
>>>> code.*
>>>> *
>>>>
>>>> *Implementation Notes
>>>> The internal representation for BigInteger is two-complement (this is
>>>> different from the sign-magnitude implementation already donated to
>>>> Harmony). BigDecimal uses only BigInteger's public interface and
>> implements
>>>> the full 5.0 specification (which has about twice as many methods as
>> in 1.4).
>>>> The code uses J2SE 5.0 features, so it requires 5.0 VM. It has been
>> tested
>>>> against Sun SDK.
>>>>
>>>> *
>>>> **
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Miguel Montes
>>>>
>>> --
>>>
>>> Tim Ellison (t.p.ellison@gmail.com)
>>> IBM Java technology centre, UK.
>>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>>
> 
> 
> --
> Miguel Montes
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: ITC: Contribution of java.math and javax.crypto

Posted by Miguel Montes <mi...@gmail.com>.
Hi Mikhail:
I'm glad that you are looking at our code.

I'm afraid that the problem was caused by Eclipse's black magic. Searching
for a Base 64 decoder, the developer typed B ctrl+space, and the first
option was BASE64Decoder. We have even src.zip removed from the
workstations, so the absence of doc comments  was not a hint.
It was clearly a mistake, and we are working on fixing it. Thanks for
pointing at it.

Miguel


On 4/6/06, Mikhail Loenko <ml...@gmail.com> wrote:
>
> Hello Miguel
>
> Thank you for your recent contribution to Harmony project!
>
> I've noticed that class javax.crypto.Util invokes a method
> from undocumented package sun.misc.*
>
> I assume that you did not have access to Sun sources, so it probably
> would be good if you provide a link to how did you learn about that Sun's
> internal functionality and its usage.
>
> Thanks,
> Mikhail
>
> 2006/3/14, Tim Ellison <t....@gmail.com>:
> > Excellent!  -- thanks Miguel and team.
> >
> > Regards,
> > Tim
> >
> > Miguel Montes wrote:
> > >  As it was announced by Iris Gastañaga we are contributing the
> packages
> > > javax.crypto and java.math on behalf of ITC (Córdoba Technolgy
> Institute).
> > > We have been developing this code for several months and we believe it
> is a
> > > valid contribution. Our code not only implements the full 5.0 API but
> also
> > > uses 5.0 features and syntax.  As 5.0 is a stated goal of Harmony we
> hope
> > > that a 5.0 VM will be available soon.
> > > We are also contributing a set of test cases for both packages.
> > >
> > > Below there is a short description of the contribution.  We will soon
> > > contribute also  an implementation of java.rmi.
> > >
> > >
> > >
> > >  *Package name*
> > > **javax.crypto
> > > *
> > > Package Description*
> > > This is a clean room implementation of the package javax.crypto as
> specified
> > > in the JDK 5.0. It requires the existence of other java packages, in
> > > particular java.security and java.util. It can be used to replace
> jce.jar in
> > > the jdk.
> > >
> > > *Current Status*
> > > The package is almost fully implemented. It does not implement the
> > > ExemptionMechanism logic.
> > >
> > > *Testing
> > > * Unit and integration tests (and their documentation) are provided
> with the
> > > code.*
> > > *
> > >
> > > *Implementation Notes
> > > The code uses heavily J2SE 5.0 features, such as generics, so it
> requires
> > > 5.0 VM and libraries (for instance java.security).
> > > It has been tested against Sun SDK, removing the original jce.jar and
> > > replacing it by ours.
> > >
> > > *
> > >
> > >
> > >
> > >
> > >  *Package name*
> > > **java.math
> > >
> > >  *Package Description*
> > > This is a clean room implementation of the package java.math as
> specified in
> > > JDK 5.0.
> > >
> > > *Current Status*
> > > The package is fully implemented.  Some methods are fairly optimized
> (for
> > > example multiplication combines paper-and-pencil and Karatsuba
> algorithms).
> > >
> > > *Testing
> > > * Unit and integration tests (and their documentation) are provided
> with the
> > > code.*
> > > *
> > >
> > > *Implementation Notes
> > > The internal representation for BigInteger is two-complement (this is
> > > different from the sign-magnitude implementation already donated to
> > > Harmony). BigDecimal uses only BigInteger's public interface and
> implements
> > > the full 5.0 specification (which has about twice as many methods as
> in 1.4).
> > > The code uses J2SE 5.0 features, so it requires 5.0 VM. It has been
> tested
> > > against Sun SDK.
> > >
> > > *
> > > **
> > >
> > >
> > >
> > >
> > > --
> > > Miguel Montes
> > >
> >
> > --
> >
> > Tim Ellison (t.p.ellison@gmail.com)
> > IBM Java technology centre, UK.
> >
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


--
Miguel Montes

Re: ITC: Contribution of java.math and javax.crypto

Posted by Mikhail Loenko <ml...@gmail.com>.
Hello Miguel

Thank you for your recent contribution to Harmony project!

I've noticed that class javax.crypto.Util invokes a method
from undocumented package sun.misc.*

I assume that you did not have access to Sun sources, so it probably
would be good if you provide a link to how did you learn about that Sun's
internal functionality and its usage.

Thanks,
Mikhail

2006/3/14, Tim Ellison <t....@gmail.com>:
> Excellent!  -- thanks Miguel and team.
>
> Regards,
> Tim
>
> Miguel Montes wrote:
> >  As it was announced by Iris Gastañaga we are contributing the packages
> > javax.crypto and java.math on behalf of ITC (Córdoba Technolgy Institute).
> > We have been developing this code for several months and we believe it is a
> > valid contribution. Our code not only implements the full 5.0 API but also
> > uses 5.0 features and syntax.  As 5.0 is a stated goal of Harmony we hope
> > that a 5.0 VM will be available soon.
> > We are also contributing a set of test cases for both packages.
> >
> > Below there is a short description of the contribution.  We will soon
> > contribute also  an implementation of java.rmi.
> >
> >
> >
> >  *Package name*
> > **javax.crypto
> > *
> > Package Description*
> > This is a clean room implementation of the package javax.crypto as specified
> > in the JDK 5.0. It requires the existence of other java packages, in
> > particular java.security and java.util. It can be used to replace jce.jar in
> > the jdk.
> >
> > *Current Status*
> > The package is almost fully implemented. It does not implement the
> > ExemptionMechanism logic.
> >
> > *Testing
> > * Unit and integration tests (and their documentation) are provided with the
> > code.*
> > *
> >
> > *Implementation Notes
> > The code uses heavily J2SE 5.0 features, such as generics, so it requires
> > 5.0 VM and libraries (for instance java.security).
> > It has been tested against Sun SDK, removing the original jce.jar and
> > replacing it by ours.
> >
> > *
> >
> >
> >
> >
> >  *Package name*
> > **java.math
> >
> >  *Package Description*
> > This is a clean room implementation of the package java.math as specified in
> > JDK 5.0.
> >
> > *Current Status*
> > The package is fully implemented.  Some methods are fairly optimized (for
> > example multiplication combines paper-and-pencil and Karatsuba algorithms).
> >
> > *Testing
> > * Unit and integration tests (and their documentation) are provided with the
> > code.*
> > *
> >
> > *Implementation Notes
> > The internal representation for BigInteger is two-complement (this is
> > different from the sign-magnitude implementation already donated to
> > Harmony). BigDecimal uses only BigInteger's public interface and implements
> > the full 5.0 specification (which has about twice as many methods as in 1.4).
> > The code uses J2SE 5.0 features, so it requires 5.0 VM. It has been tested
> > against Sun SDK.
> >
> > *
> > **
> >
> >
> >
> >
> > --
> > Miguel Montes
> >
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: ITC: Contribution of java.math and javax.crypto

Posted by Tim Ellison <t....@gmail.com>.
Excellent!  -- thanks Miguel and team.

Regards,
Tim

Miguel Montes wrote:
>  As it was announced by Iris Gastañaga we are contributing the packages
> javax.crypto and java.math on behalf of ITC (Córdoba Technolgy Institute).
> We have been developing this code for several months and we believe it is a
> valid contribution. Our code not only implements the full 5.0 API but also
> uses 5.0 features and syntax.  As 5.0 is a stated goal of Harmony we hope
> that a 5.0 VM will be available soon.
> We are also contributing a set of test cases for both packages.
> 
> Below there is a short description of the contribution.  We will soon
> contribute also  an implementation of java.rmi.
> 
> 
> 
>  *Package name*
> **javax.crypto
> *
> Package Description*
> This is a clean room implementation of the package javax.crypto as specified
> in the JDK 5.0. It requires the existence of other java packages, in
> particular java.security and java.util. It can be used to replace jce.jar in
> the jdk.
> 
> *Current Status*
> The package is almost fully implemented. It does not implement the
> ExemptionMechanism logic.
> 
> *Testing
> * Unit and integration tests (and their documentation) are provided with the
> code.*
> *
> 
> *Implementation Notes
> The code uses heavily J2SE 5.0 features, such as generics, so it requires
> 5.0 VM and libraries (for instance java.security).
> It has been tested against Sun SDK, removing the original jce.jar and
> replacing it by ours.
> 
> *
> 
> 
> 
> 
>  *Package name*
> **java.math
> 
>  *Package Description*
> This is a clean room implementation of the package java.math as specified in
> JDK 5.0.
> 
> *Current Status*
> The package is fully implemented.  Some methods are fairly optimized (for
> example multiplication combines paper-and-pencil and Karatsuba algorithms).
> 
> *Testing
> * Unit and integration tests (and their documentation) are provided with the
> code.*
> *
> 
> *Implementation Notes
> The internal representation for BigInteger is two-complement (this is
> different from the sign-magnitude implementation already donated to
> Harmony). BigDecimal uses only BigInteger's public interface and implements
> the full 5.0 specification (which has about twice as many methods as in 1.4).
> The code uses J2SE 5.0 features, so it requires 5.0 VM. It has been tested
> against Sun SDK.
> 
> *
> **
> 
> 
> 
> 
> --
> Miguel Montes
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.