mirrored from https://www.bouncycastle.org/repositories/bc-java
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3,530 changed files
with
495,173 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package org.bouncycastle; | ||
|
||
/** | ||
* The Bouncy Castle License | ||
* | ||
* Copyright (c) 2000-2012 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) | ||
* <p> | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software | ||
* and associated documentation files (the "Software"), to deal in the Software without restriction, | ||
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | ||
* subject to the following conditions: | ||
* <p> | ||
* The above copyright notice and this permission notice shall be included in all copies or substantial | ||
* portions of the Software. | ||
* <p> | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
* DEALINGS IN THE SOFTWARE. | ||
*/ | ||
public class LICENSE | ||
{ | ||
public static String licenseText = | ||
"Copyright (c) 2000-2012 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) " | ||
+ System.getProperty("line.separator") | ||
+ System.getProperty("line.separator") | ||
+ "Permission is hereby granted, free of charge, to any person obtaining a copy of this software " | ||
+ System.getProperty("line.separator") | ||
+ "and associated documentation files (the \"Software\"), to deal in the Software without restriction, " | ||
+ System.getProperty("line.separator") | ||
+ "including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, " | ||
+ System.getProperty("line.separator") | ||
+ "and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so," | ||
+ System.getProperty("line.separator") | ||
+ "subject to the following conditions:" | ||
+ System.getProperty("line.separator") | ||
+ System.getProperty("line.separator") | ||
+ "The above copyright notice and this permission notice shall be included in all copies or substantial" | ||
+ System.getProperty("line.separator") | ||
+ "portions of the Software." | ||
+ System.getProperty("line.separator") | ||
+ System.getProperty("line.separator") | ||
+ "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED," | ||
+ System.getProperty("line.separator") | ||
+ "INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR" | ||
+ System.getProperty("line.separator") | ||
+ "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE" | ||
+ System.getProperty("line.separator") | ||
+ "LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR" | ||
+ System.getProperty("line.separator") | ||
+ "OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER" | ||
+ System.getProperty("line.separator") | ||
+ "DEALINGS IN THE SOFTWARE."; | ||
|
||
public static void main( | ||
String[] args) | ||
{ | ||
System.out.println(licenseText); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
core/src/main/java/org/bouncycastle/asn1/ASN1ApplicationSpecificParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.bouncycastle.asn1; | ||
|
||
import java.io.IOException; | ||
|
||
public interface ASN1ApplicationSpecificParser | ||
extends ASN1Encodable, InMemoryRepresentable | ||
{ | ||
ASN1Encodable readObject() | ||
throws IOException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.bouncycastle.asn1; | ||
|
||
public class ASN1Boolean | ||
extends DERBoolean | ||
{ | ||
public ASN1Boolean(boolean value) | ||
{ | ||
super(value); | ||
} | ||
|
||
ASN1Boolean(byte[] value) | ||
{ | ||
super(value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.bouncycastle.asn1; | ||
|
||
/** | ||
* Marker interface for CHOICE objects - if you implement this in a role your | ||
* own object any attempt to tag the object implicitly will convert the tag to | ||
* an explicit one as the encoding rules require. | ||
* <p> | ||
* If you use this interface your class should also implement the getInstance | ||
* pattern which takes a tag object and the tagging mode used. | ||
*/ | ||
public interface ASN1Choice | ||
{ | ||
// marker interface | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package org.bouncycastle.asn1; | ||
|
||
public interface ASN1Encodable | ||
{ | ||
ASN1Primitive toASN1Primitive(); | ||
} |
36 changes: 36 additions & 0 deletions
36
core/src/main/java/org/bouncycastle/asn1/ASN1EncodableVector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.bouncycastle.asn1; | ||
|
||
import java.util.Enumeration; | ||
import java.util.Vector; | ||
|
||
public class ASN1EncodableVector | ||
{ | ||
Vector v = new Vector(); | ||
|
||
public ASN1EncodableVector() | ||
{ | ||
} | ||
|
||
public void add(ASN1Encodable obj) | ||
{ | ||
v.addElement(obj); | ||
} | ||
|
||
public void addAll(ASN1EncodableVector other) | ||
{ | ||
for (Enumeration en = other.v.elements(); en.hasMoreElements();) | ||
{ | ||
v.addElement(en.nextElement()); | ||
} | ||
} | ||
|
||
public ASN1Encodable get(int i) | ||
{ | ||
return (ASN1Encodable)v.elementAt(i); | ||
} | ||
|
||
public int size() | ||
{ | ||
return v.size(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.bouncycastle.asn1; | ||
|
||
public interface ASN1Encoding | ||
{ | ||
static final String DER = "DER"; | ||
static final String DL = "DL"; | ||
static final String BER = "BER"; | ||
} |
22 changes: 22 additions & 0 deletions
22
core/src/main/java/org/bouncycastle/asn1/ASN1Enumerated.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.bouncycastle.asn1; | ||
|
||
import java.math.BigInteger; | ||
|
||
public class ASN1Enumerated | ||
extends DEREnumerated | ||
{ | ||
ASN1Enumerated(byte[] bytes) | ||
{ | ||
super(bytes); | ||
} | ||
|
||
public ASN1Enumerated(BigInteger value) | ||
{ | ||
super(value); | ||
} | ||
|
||
public ASN1Enumerated(int value) | ||
{ | ||
super(value); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
core/src/main/java/org/bouncycastle/asn1/ASN1Exception.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.bouncycastle.asn1; | ||
|
||
import java.io.IOException; | ||
|
||
public class ASN1Exception | ||
extends IOException | ||
{ | ||
private Throwable cause; | ||
|
||
ASN1Exception(String message) | ||
{ | ||
super(message); | ||
} | ||
|
||
ASN1Exception(String message, Throwable cause) | ||
{ | ||
super(message); | ||
this.cause = cause; | ||
} | ||
|
||
public Throwable getCause() | ||
{ | ||
return cause; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
core/src/main/java/org/bouncycastle/asn1/ASN1GeneralizedTime.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.bouncycastle.asn1; | ||
|
||
import java.util.Date; | ||
|
||
public class ASN1GeneralizedTime | ||
extends DERGeneralizedTime | ||
{ | ||
ASN1GeneralizedTime(byte[] bytes) | ||
{ | ||
super(bytes); | ||
} | ||
|
||
public ASN1GeneralizedTime(Date time) | ||
{ | ||
super(time); | ||
} | ||
|
||
public ASN1GeneralizedTime(String time) | ||
{ | ||
super(time); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
core/src/main/java/org/bouncycastle/asn1/ASN1Generator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.bouncycastle.asn1; | ||
|
||
import java.io.OutputStream; | ||
|
||
public abstract class ASN1Generator | ||
{ | ||
protected OutputStream _out; | ||
|
||
public ASN1Generator(OutputStream out) | ||
{ | ||
_out = out; | ||
} | ||
|
||
public abstract OutputStream getRawOutputStream(); | ||
} |
Oops, something went wrong.