Skip to content

Commit

Permalink
Final prep for release of 0.9.8 (#79)
Browse files Browse the repository at this point in the history
* Error fixes for release

Get the version number correct
Fix the errors that JavaDoc was throwing.
  • Loading branch information
jimsch authored Nov 3, 2018
1 parent ff8e8d3 commit 15b428f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.augustcellars.cose</groupId>
<artifactId>cose-java</artifactId>
<version>0.9.8-SNAPSHOT</version>
<version>0.9.8</version>

<name>com.augustcellars.cose:cose-java</name>
<description>A Java implementation that supports the COSE secure message specification.</description>
Expand Down
15 changes: 8 additions & 7 deletions src/main/java/COSE/ASN1.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ public TagValue(int tagIn, ArrayList<TagValue> listIn) {
* for the key
* This function assumes that we are encoding an EC Public key.d
*
* @param oid - encoded Object Identifier
* @param algorithm - encoded Object Identifier
* @param keyBytes - encoded key bytes
* @return - encoded SPKI
* @throws CoseException - ASN encoding error.
*/
public static byte[] EncodeSubjectPublicKeyInfo(byte[] algorithm, byte[] keyBytes) throws CoseException
{
Expand Down Expand Up @@ -96,8 +97,8 @@ public static byte[] EncodeSubjectPublicKeyInfo(byte[] algorithm, byte[] keyByte
* @param oid - curve to use
* @param keyBytes - bytes of the key
* @param spki - optional SPKI
* @return
* @throws CoseException
* @return encoded private key
* @throws CoseException - from lower level
*/
public static byte[] EncodeEcPrivateKey(byte[] oid, byte[] keyBytes, byte[] spki) throws CoseException
{
Expand Down Expand Up @@ -170,7 +171,7 @@ public static ArrayList<TagValue> DecodeSubjectPublicKeyInfo(byte[] encoding) th
* @param offset - starting offset in array to begin decoding
* @param encoding - bytes of the ASN.1 encoded value
* @return Decoded structure
* @throws CoseException
* @throws CoseException - ASN.1 encoding errors
*/
public static TagValue DecodeCompound(int offset, byte[] encoding) throws CoseException
{
Expand Down Expand Up @@ -214,11 +215,11 @@ public static TagValue DecodeCompound(int offset, byte[] encoding) throws CoseEx
/**
* Encode a private key into a PKCS#8 private key structure.
*
* @param oid - EC curve OID
* @param algorithm - EC curve OID
* @param keyBytes - raw bytes of the key
* @param spki - optional subject public key info structure to include
* @return byte array of encoded bytes
* @throws CoseException
* @throws CoseException - ASN.1 encoding errors
*/
public static byte[] EncodePKCS8(byte[] algorithm, byte[] keyBytes, byte[] spki) throws CoseException
{
Expand Down Expand Up @@ -255,7 +256,7 @@ public static byte[] EncodePKCS8(byte[] algorithm, byte[] keyBytes, byte[] spki)
*
* @param encodedData bytes containing the private key
* @return tag/value from the decoded object
* @throws CoseException
* @throws CoseException - ASN.1 encoding errors
*/
public static ArrayList<TagValue> DecodePKCS8(byte[] encodedData) throws CoseException
{
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/COSE/Attribute.java
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public void removeAttribute(CBORObject label) throws CoseException {
* Remove an attribute from the set of all attribute maps.
*
* @param label attribute to be removed
* @throws CoseException
* @throws CoseException - Label not present
*/
public void removeAttribute(HeaderKeys label) throws CoseException {
removeAttribute(label.AsCBOR());
Expand All @@ -353,7 +353,7 @@ public void removeAttribute(HeaderKeys label) throws CoseException {
/**
* Get the optional external data field to be authenticated
*
* * @return external authenticated data
* @return external authenticated data
*/
public byte[] getExternal() {
return externalData;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/COSE/Encrypt0Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected CBORObject EncodeCBORObject() throws CoseException {
*
* @param rgbKey key for decryption
* @return the decrypted content
* @throws CoseException
* @throws CoseException - Error during decryption
*/
public byte[] decrypt(byte[] rgbKey) throws CoseException {
return super.decryptWithKey(rgbKey);
Expand All @@ -100,8 +100,8 @@ public byte[] decrypt(byte[] rgbKey) throws CoseException {
* Encrypt the message using the passed in key.
*
* @param rgbKey key used for encryption
* @throws CoseException
* @throws IllegalStateException
* @throws CoseException - Error during decryption
* @throws IllegalStateException - Error during decryption
*/
public void encrypt(byte[] rgbKey) throws CoseException, IllegalStateException {
super.encryptWithKey(rgbKey);
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/COSE/Signer.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public void clearKey() {
*
* @since COSE 0.9.1
* @param keyIn key to be used for signing or verification
* @throws CoseException - Invalid key passed in
*/
public void setKey(OneKey keyIn) throws CoseException {
setupKey(keyIn);
Expand All @@ -64,7 +65,7 @@ public void setKey(OneKey keyIn) throws CoseException {
* Set the key on the object, if there is not a signature on this object then set
* the algorithm and the key id from the key if they exist on the key and do not exist in the message.
*
* @param key key to be used
* @param key key to be used]
*/
private void setupKey(OneKey key) throws CoseException {
CBORObject cn2;
Expand Down

0 comments on commit 15b428f

Please sign in to comment.