Skip to content

Commit

Permalink
Merge pull request #58 from jimsch/master
Browse files Browse the repository at this point in the history
Add new User Data field to the One Key structure
  • Loading branch information
jimsch authored Jun 21, 2017
2 parents 2e57e65 + b79eea3 commit dce04e7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Still need to figure this out.

## Contributing

Go ahead, file issues, make pull requests. There is an automated build process that will both build and run the test suites on any requests. These will need to pass, or have solid documentation about why they donot pass, before any pull request will be merged.
Go ahead, file issues, make pull requests. There is an automated build process that will both build and run the test suites on any requests. These will need to pass, or have solid documentation about why they do not pass, before any pull request will be merged.

## Building

Expand Down
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.6-snapshot</version>
<version>0.9.6</version>

<name>com.augustcellars.cose:cose-java</name>
<description>A Java implementation that supports the COSE secure message specification.</description>
Expand Down
24 changes: 24 additions & 0 deletions src/main/java/COSE/OneKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -354,4 +354,28 @@ public PrivateKey AsPrivateKey() throws CoseException
}
throw new CoseException("Cannot convert key as key type is not converted");
}

private Object UserData;

/**
* Return the user data field.
*
* The user data object allows for an application to associate a piece of arbitrary
* data with a key and retrieve it later.
* @return
*/
public Object getUserData() {
return UserData;
}

/**
* Set the user data field.
*
* The user data field allows for an application to associate a piece of arbitrary
* data with a key and retrieve it later.
* @param newData Data field to be saved.
*/
public void setUserData(Object newData) {
UserData = newData;
}
}

0 comments on commit dce04e7

Please sign in to comment.