Skip to content

Commit 15b428f

Browse files
authored
Final prep for release of 0.9.8 (#79)
* Error fixes for release Get the version number correct Fix the errors that JavaDoc was throwing.
1 parent ff8e8d3 commit 15b428f

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.augustcellars.cose</groupId>
88
<artifactId>cose-java</artifactId>
9-
<version>0.9.8-SNAPSHOT</version>
9+
<version>0.9.8</version>
1010

1111
<name>com.augustcellars.cose:cose-java</name>
1212
<description>A Java implementation that supports the COSE secure message specification.</description>

src/main/java/COSE/ASN1.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ public TagValue(int tagIn, ArrayList<TagValue> listIn) {
6262
* for the key
6363
* This function assumes that we are encoding an EC Public key.d
6464
*
65-
* @param oid - encoded Object Identifier
65+
* @param algorithm - encoded Object Identifier
6666
* @param keyBytes - encoded key bytes
6767
* @return - encoded SPKI
68+
* @throws CoseException - ASN encoding error.
6869
*/
6970
public static byte[] EncodeSubjectPublicKeyInfo(byte[] algorithm, byte[] keyBytes) throws CoseException
7071
{
@@ -96,8 +97,8 @@ public static byte[] EncodeSubjectPublicKeyInfo(byte[] algorithm, byte[] keyByte
9697
* @param oid - curve to use
9798
* @param keyBytes - bytes of the key
9899
* @param spki - optional SPKI
99-
* @return
100-
* @throws CoseException
100+
* @return encoded private key
101+
* @throws CoseException - from lower level
101102
*/
102103
public static byte[] EncodeEcPrivateKey(byte[] oid, byte[] keyBytes, byte[] spki) throws CoseException
103104
{
@@ -170,7 +171,7 @@ public static ArrayList<TagValue> DecodeSubjectPublicKeyInfo(byte[] encoding) th
170171
* @param offset - starting offset in array to begin decoding
171172
* @param encoding - bytes of the ASN.1 encoded value
172173
* @return Decoded structure
173-
* @throws CoseException
174+
* @throws CoseException - ASN.1 encoding errors
174175
*/
175176
public static TagValue DecodeCompound(int offset, byte[] encoding) throws CoseException
176177
{
@@ -214,11 +215,11 @@ public static TagValue DecodeCompound(int offset, byte[] encoding) throws CoseEx
214215
/**
215216
* Encode a private key into a PKCS#8 private key structure.
216217
*
217-
* @param oid - EC curve OID
218+
* @param algorithm - EC curve OID
218219
* @param keyBytes - raw bytes of the key
219220
* @param spki - optional subject public key info structure to include
220221
* @return byte array of encoded bytes
221-
* @throws CoseException
222+
* @throws CoseException - ASN.1 encoding errors
222223
*/
223224
public static byte[] EncodePKCS8(byte[] algorithm, byte[] keyBytes, byte[] spki) throws CoseException
224225
{
@@ -255,7 +256,7 @@ public static byte[] EncodePKCS8(byte[] algorithm, byte[] keyBytes, byte[] spki)
255256
*
256257
* @param encodedData bytes containing the private key
257258
* @return tag/value from the decoded object
258-
* @throws CoseException
259+
* @throws CoseException - ASN.1 encoding errors
259260
*/
260261
public static ArrayList<TagValue> DecodePKCS8(byte[] encodedData) throws CoseException
261262
{

src/main/java/COSE/Attribute.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public void removeAttribute(CBORObject label) throws CoseException {
344344
* Remove an attribute from the set of all attribute maps.
345345
*
346346
* @param label attribute to be removed
347-
* @throws CoseException
347+
* @throws CoseException - Label not present
348348
*/
349349
public void removeAttribute(HeaderKeys label) throws CoseException {
350350
removeAttribute(label.AsCBOR());
@@ -353,7 +353,7 @@ public void removeAttribute(HeaderKeys label) throws CoseException {
353353
/**
354354
* Get the optional external data field to be authenticated
355355
*
356-
* * @return external authenticated data
356+
* @return external authenticated data
357357
*/
358358
public byte[] getExternal() {
359359
return externalData;

src/main/java/COSE/Encrypt0Message.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected CBORObject EncodeCBORObject() throws CoseException {
9090
*
9191
* @param rgbKey key for decryption
9292
* @return the decrypted content
93-
* @throws CoseException
93+
* @throws CoseException - Error during decryption
9494
*/
9595
public byte[] decrypt(byte[] rgbKey) throws CoseException {
9696
return super.decryptWithKey(rgbKey);
@@ -100,8 +100,8 @@ public byte[] decrypt(byte[] rgbKey) throws CoseException {
100100
* Encrypt the message using the passed in key.
101101
*
102102
* @param rgbKey key used for encryption
103-
* @throws CoseException
104-
* @throws IllegalStateException
103+
* @throws CoseException - Error during decryption
104+
* @throws IllegalStateException - Error during decryption
105105
*/
106106
public void encrypt(byte[] rgbKey) throws CoseException, IllegalStateException {
107107
super.encryptWithKey(rgbKey);

src/main/java/COSE/Signer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public void clearKey() {
5555
*
5656
* @since COSE 0.9.1
5757
* @param keyIn key to be used for signing or verification
58+
* @throws CoseException - Invalid key passed in
5859
*/
5960
public void setKey(OneKey keyIn) throws CoseException {
6061
setupKey(keyIn);
@@ -64,7 +65,7 @@ public void setKey(OneKey keyIn) throws CoseException {
6465
* Set the key on the object, if there is not a signature on this object then set
6566
* the algorithm and the key id from the key if they exist on the key and do not exist in the message.
6667
*
67-
* @param key key to be used
68+
* @param key key to be used]
6869
*/
6970
private void setupKey(OneKey key) throws CoseException {
7071
CBORObject cn2;

0 commit comments

Comments
 (0)