23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/legal/ASSEMBLY_EXCEPTION:
--------------------------------------------------------------------------------
1 |
2 | OPENJDK ASSEMBLY EXCEPTION
3 |
4 | The OpenJDK source code made available by Oracle America, Inc. (Oracle) at
5 | openjdk.org ("OpenJDK Code") is distributed under the terms of the GNU
6 | General Public License version 2
7 | only ("GPL2"), with the following clarification and special exception.
8 |
9 | Linking this OpenJDK Code statically or dynamically with other code
10 | is making a combined work based on this library. Thus, the terms
11 | and conditions of GPL2 cover the whole combination.
12 |
13 | As a special exception, Oracle gives you permission to link this
14 | OpenJDK Code with certain code licensed by Oracle as indicated at
15 | https://openjdk.org/legal/exception-modules-2007-05-08.html
16 | ("Designated Exception Modules") to produce an executable,
17 | regardless of the license terms of the Designated Exception Modules,
18 | and to copy and distribute the resulting executable under GPL2,
19 | provided that the Designated Exception Modules continue to be
20 | governed by the licenses under which they were offered by Oracle.
21 |
22 | As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code
23 | to build an executable that includes those portions of necessary code that
24 | Oracle could not provide under GPL2 (or that Oracle has provided under GPL2
25 | with the Classpath exception). If you modify or add to the OpenJDK code,
26 | that new GPL2 code may still be combined with Designated Exception Modules
27 | if the new code is made subject to this exception by its copyright holder.
28 |
--------------------------------------------------------------------------------
/copy.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
27 |
28 |
34 |
--------------------------------------------------------------------------------
/link.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
27 |
28 |
32 |
--------------------------------------------------------------------------------
/resources/fonts/dejavu.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'DejaVu Sans Mono';
3 | src: url('DejaVuLGCSansMono.woff2') format('woff2');
4 | font-weight: normal;
5 | font-style: normal;
6 | }
7 | @font-face {
8 | font-family: 'DejaVu Sans Mono';
9 | src: url('DejaVuLGCSansMono-Oblique.woff2') format('woff2');
10 | font-weight: normal;
11 | font-style: italic;
12 | }
13 | @font-face {
14 | font-family: 'DejaVu Sans Mono';
15 | src: url('DejaVuLGCSansMono-Bold.woff2') format('woff2');
16 | font-weight: bold;
17 | font-style: normal;
18 | }
19 | @font-face {
20 | font-family: 'DejaVu Sans Mono';
21 | src: url('DejaVuLGCSansMono-BoldOblique.woff2') format('woff2');
22 | font-weight: bold;
23 | font-style: italic;
24 | }
25 |
26 | @font-face {
27 | font-family: 'DejaVu Sans';
28 | src: url('DejaVuLGCSans.woff2') format('woff2');
29 | font-weight: normal;
30 | font-style: normal;
31 | }
32 | @font-face {
33 | font-family: 'DejaVu Sans';
34 | src: url('DejaVuLGCSans-Oblique.woff2') format('woff2');
35 | font-weight: normal;
36 | font-style: italic;
37 | }
38 | @font-face {
39 | font-family: 'DejaVu Sans';
40 | src: url('DejaVuLGCSans-Bold.woff2') format('woff2');
41 | font-weight: bold;
42 | font-style: normal;
43 | }
44 | @font-face {
45 | font-family: 'DejaVu Sans';
46 | src: url('DejaVuLGCSans-BoldOblique.woff2') format('woff2');
47 | font-weight: bold;
48 | font-style: italic;
49 | }
50 |
51 | @font-face {
52 | font-family: 'DejaVu Serif';
53 | src: url('DejaVuLGCSerif.woff2') format('woff2');
54 | font-weight: normal;
55 | font-style: normal;
56 | }
57 | @font-face {
58 | font-family: 'DejaVu Serif';
59 | src: url('DejaVuLGCSerif-Italic.woff2') format('woff2');
60 | font-weight: normal;
61 | font-style: italic;
62 | }
63 | @font-face {
64 | font-family: 'DejaVu Serif';
65 | src: url('DejaVuLGCSerif-Bold.woff2') format('woff2');
66 | font-weight: bold;
67 | font-style: normal;
68 | }
69 | @font-face {
70 | font-family: 'DejaVu Serif';
71 | src: url('DejaVuLGCSerif-BoldItalic.woff2') format('woff2');
72 | font-weight: bold;
73 | font-style: italic;
74 | }
75 |
--------------------------------------------------------------------------------
/legal/ADDITIONAL_LICENSE_INFO:
--------------------------------------------------------------------------------
1 | ADDITIONAL INFORMATION ABOUT LICENSING
2 |
3 | Certain files distributed by Oracle America, Inc. and/or its affiliates are
4 | subject to the following clarification and special exception to the GPLv2,
5 | based on the GNU Project exception for its Classpath libraries, known as the
6 | GNU Classpath Exception.
7 |
8 | Note that Oracle includes multiple, independent programs in this software
9 | package. Some of those programs are provided under licenses deemed
10 | incompatible with the GPLv2 by the Free Software Foundation and others.
11 | For example, the package includes programs licensed under the Apache
12 | License, Version 2.0 and may include FreeType. Such programs are licensed
13 | to you under their original licenses.
14 |
15 | Oracle facilitates your further distribution of this package by adding the
16 | Classpath Exception to the necessary parts of its GPLv2 code, which permits
17 | you to use that code in combination with other independent modules not
18 | licensed under the GPLv2. However, note that this would not permit you to
19 | commingle code under an incompatible license with Oracle's GPLv2 licensed
20 | code by, for example, cutting and pasting such code into a file also
21 | containing Oracle's GPLv2 licensed code and then distributing the result.
22 |
23 | Additionally, if you were to remove the Classpath Exception from any of the
24 | files to which it applies and distribute the result, you would likely be
25 | required to license some or all of the other code in that distribution under
26 | the GPLv2 as well, and since the GPLv2 is incompatible with the license terms
27 | of some items included in the distribution by Oracle, removing the Classpath
28 | Exception could therefore effectively compromise your ability to further
29 | distribute the package.
30 |
31 | Failing to distribute notices associated with some files may also create
32 | unexpected legal consequences.
33 |
34 | Proceed with caution and we recommend that you obtain the advice of a lawyer
35 | skilled in open source matters before removing the Classpath Exception or
36 | making modifications to this package which may subsequently be redistributed
37 | and/or involve the use of third party software.
38 |
--------------------------------------------------------------------------------
/org/webpki/jose/package-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | org.webpki.jose Class Hierarchy (WebPKI.org Support)
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
64 | The Net package contains a single class which is used by several
65 | WebPKI projects for HTTPS communication.
66 | This class also supports a command-line operation which is somewhat
67 | similar to "curl" and Linux "get".
39 | The CBOR library contains support for wrapping CSF and
40 | CEF containers in a CBORTag as well as
41 | including a customData element.
42 |
43 | In both cases the added information becomes a part of the
44 | authenticated (signed) data.
45 |
46 |
47 | Note that these options represent extensions that in order to be
48 | accepted during validation respectively decryption, must
49 | be preceded by setting a for the application suitable policy
50 | (CBORCryptoUtils.POLICY).
51 |
52 |
Creating Tagged Containers
53 | Creating a tagged CSF only requires wrapping the map to be signed in a
54 | suitable CBORTag object.
55 |
73 | Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page.
74 |
75 |
76 |
Kinds of Pages
77 | The following sections describe the different kinds of pages in this collection.
78 |
79 |
Overview
80 |
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
81 |
82 |
83 |
Package
84 |
Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
85 |
86 |
Interfaces
87 |
Classes
88 |
Enum Classes
89 |
Exception Classes
90 |
Annotation Interfaces
91 |
92 |
93 |
94 |
Class or Interface
95 |
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
96 |
97 |
Class Inheritance Diagram
98 |
Direct Subclasses
99 |
All Known Subinterfaces
100 |
All Known Implementing Classes
101 |
Class or Interface Declaration
102 |
Class or Interface Description
103 |
104 |
105 |
106 |
Nested Class Summary
107 |
Enum Constant Summary
108 |
Field Summary
109 |
Property Summary
110 |
Constructor Summary
111 |
Method Summary
112 |
Required Element Summary
113 |
Optional Element Summary
114 |
115 |
116 |
117 |
Enum Constant Details
118 |
Field Details
119 |
Property Details
120 |
Constructor Details
121 |
Method Details
122 |
Element Details
123 |
124 |
Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
125 |
The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
126 |
127 |
128 |
Other Files
129 |
Packages and modules may contain pages with additional information related to the declarations nearby.
130 |
131 |
132 |
Tree (Class Hierarchy)
133 |
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.
134 |
135 |
When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
136 |
When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.
146 |
147 |
148 |
149 | This help file applies to API documentation generated by the standard doclet.
150 |
154 |
127 | An implementation is supposed to throw an exception if it
128 | does not find a matching key or if the supplied algorithm does
129 | not meet the policy.
130 |
131 |
132 |
Parameters:
133 |
optionalKeyId - Optional key Id found in the encryption object
134 |
contentEncryptionAlgorithm - The requested content encryption algorithm
135 |
Returns:
136 |
Decryption key
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
151 |
152 |
153 |
154 |
155 |
--------------------------------------------------------------------------------
/org/webpki/cbor/doc-files/floatingpoint-variation.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2006-2021 WebPKI.org (http://webpki.org).
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 | package org.webpki.cbor;
18 |
19 | import java.io.IOException;
20 |
21 | /**
22 | * Class for holding CBOR floating point numbers.
23 | *
24 | * Numbers are constrained to the IEEE 754 notation
25 | * using the length 16, 32, and 64 bit on "wire". Which
26 | * length to use is governed by the size and precision
27 | * required to (minimally) correctly represent a number.
28 | * API-wise numbers are only communicated as
29 | * 64-bit items (Java double).
30 | *
31 | */
32 | public class CBORFloatingPoint extends CBORObject {
33 |
34 | double value;
35 |
36 | /**
37 | * CBOR representation of value
38 | */
39 | int tag;
40 | long bitFormat;
41 |
42 | /**
43 | * Creates a CBOR floating point.
44 | *
45 | * @param value
46 | */
47 | public CBORFloatingPoint(double value) {
48 | this.value = value;
49 |
50 | // Initial assumption: it is a plain vanilla 64-bit double.
51 | tag = MT_FLOAT64;
52 | bitFormat = Double.doubleToLongBits(value);
53 |
54 | // Check for possible edge cases.
55 | if ((bitFormat & ~FLOAT64_NEG_ZERO) == FLOAT64_POS_ZERO) {
56 | // Some zeroes are more zero than others :)
57 | tag = MT_FLOAT16;
58 | bitFormat = (bitFormat == FLOAT64_POS_ZERO) ? FLOAT16_POS_ZERO : FLOAT16_NEG_ZERO;
59 | } else if ((bitFormat & FLOAT64_POS_INFINITY) == FLOAT64_POS_INFINITY) {
60 | // Special "number".
61 | tag = MT_FLOAT16;
62 | bitFormat = (bitFormat == FLOAT64_POS_INFINITY) ?
63 | FLOAT16_POS_INFINITY : (bitFormat == FLOAT64_NEG_INFINITY) ?
64 | // Deterministic representation of NaN => No NaN "signaling".
65 | FLOAT16_NEG_INFINITY : FLOAT16_NOT_A_NUMBER;
66 | } else {
67 | // It is apparently a regular number. Does it fit in a 32-bit float?
68 |
69 | // Note: the following 64-bit to 32-bit conversion and tests could be replaced
70 | // by two lines of Java code but I wanted to see how ugly a "raw" variant
71 | // would be. Fortunately it wasn't too horrible :)
72 | long signBit = bitFormat & FLOAT64_NEG_ZERO;
73 | long exponent = ((bitFormat >>> FLOAT64_SIGNIFICAND_SIZE) &
74 | ((1l << FLOAT64_EXPONENT_SIZE) - 1)) -
75 | (FLOAT64_EXPONENT_BIAS - FLOAT32_EXPONENT_BIAS);
76 | if (exponent > (FLOAT32_EXPONENT_BIAS << 1)) {
77 | // Too big for float32 or into the space reserved for NaN and Infinity.
78 | return;
79 | }
80 |
81 | long significand = bitFormat & ((1l << FLOAT64_SIGNIFICAND_SIZE) - 1);
82 | if ((significand &
83 | ((1l << (FLOAT64_SIGNIFICAND_SIZE - FLOAT32_SIGNIFICAND_SIZE)) - 1)) != 0) {
84 | // Losing significand bits is not an option.
85 | return;
86 | }
87 | significand >>= (FLOAT64_SIGNIFICAND_SIZE - FLOAT32_SIGNIFICAND_SIZE);
88 |
89 | // Check if we need to denormalize data.
90 | if (exponent <= 0) {
91 | // The implicit "1" becomes explicit using subnormal representation.
92 | significand += 1l << FLOAT32_SIGNIFICAND_SIZE;
93 | exponent--;
94 | // Always perform at least one turn.
95 | do {
96 | if ((significand & 1) != 0) {
97 | // Too off scale for float32.
98 | // This test also catches subnormal float64 numbers.
99 | return;
100 | }
101 | significand >>= 1;
102 | } while (++exponent < 0);
103 | }
104 |
105 | // New assumption: we settle on 32-bit float representation.
106 | tag = MT_FLOAT32;
107 | bitFormat =
108 | // Put possible sign bit in position.
109 | (signBit >>> (64 - 32)) +
110 | // Exponent. Put it in front of significand.
111 | (exponent << FLOAT32_SIGNIFICAND_SIZE) +
112 | // Significand.
113 | significand;
114 |
115 | // However, we must still check if the number could fit in a 16-bit float.
116 | exponent -= (FLOAT32_EXPONENT_BIAS - FLOAT16_EXPONENT_BIAS);
117 | if (exponent > (FLOAT16_EXPONENT_BIAS << 1)) {
118 | // Too big for float16 or into the space reserved for NaN and Infinity.
119 | return;
120 | }
121 |
122 | if ((significand &
123 | ((1l << (FLOAT32_SIGNIFICAND_SIZE - FLOAT16_SIGNIFICAND_SIZE)) - 1)) != 0) {
124 | // Losing significand bits is not an option.
125 | return;
126 | }
127 | significand >>= (FLOAT32_SIGNIFICAND_SIZE - FLOAT16_SIGNIFICAND_SIZE);
128 |
129 | // Check if we need to denormalize data.
130 | if (exponent <= 0) {
131 | // The implicit "1" becomes explicit using subnormal representation.
132 | significand += 1l << FLOAT16_SIGNIFICAND_SIZE;
133 | exponent--;
134 | // Always perform at least one turn.
135 | do {
136 | if ((significand & 1) != 0) {
137 | // Too off scale for float16.
138 | // This test also catches subnormal float32 numbers.
139 | return;
140 | }
141 | significand >>= 1;
142 | } while (++exponent < 0);
143 | }
144 |
145 | // Seems like 16 bits indeed are sufficient!
146 | tag = MT_FLOAT16;
147 | bitFormat =
148 | // Put possible sign bit in position.
149 | (signBit >>> (64 - 16)) +
150 | // Exponent. Put it in front of significand.
151 | (exponent << FLOAT16_SIGNIFICAND_SIZE) +
152 | // Significand.
153 | significand;
154 | }
155 | }
156 |
157 | /**
158 | * A slightly nicer formatter than Java's original
159 | *
160 | * @param value The double
161 | * @return The double in string format
162 | */
163 | public static String formatDouble(double value) {
164 | return Double.toString(value).replace('E', 'e').replaceAll("e(\\d)", "e+$1");
165 | }
166 |
167 | @Override
168 | CBORTypes internalGetType() {
169 | return CBORTypes.FLOATING_POINT;
170 | }
171 |
172 | @Override
173 | byte[] internalEncode() throws IOException {
174 | return encodeTagAndValue(tag, 2 << (tag - MT_FLOAT16), bitFormat);
175 | }
176 |
177 | @Override
178 | void internalToString(CBORObject.DiagnosticNotation cborPrinter) {
179 | cborPrinter.append(formatDouble(value));
180 | }
181 | }
182 |
--------------------------------------------------------------------------------
/org/webpki/util/package-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | org.webpki.util Class Hierarchy (WebPKI.org Support)
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |