Skip to content

Commit dce04e7

Browse files
authored
Merge pull request #58 from jimsch/master
Add new User Data field to the One Key structure
2 parents 2e57e65 + b79eea3 commit dce04e7

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Still need to figure this out.
2828

2929
## Contributing
3030

31-
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.
31+
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.
3232

3333
## Building
3434

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.6-snapshot</version>
9+
<version>0.9.6</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/OneKey.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,4 +354,28 @@ public PrivateKey AsPrivateKey() throws CoseException
354354
}
355355
throw new CoseException("Cannot convert key as key type is not converted");
356356
}
357+
358+
private Object UserData;
359+
360+
/**
361+
* Return the user data field.
362+
*
363+
* The user data object allows for an application to associate a piece of arbitrary
364+
* data with a key and retrieve it later.
365+
* @return
366+
*/
367+
public Object getUserData() {
368+
return UserData;
369+
}
370+
371+
/**
372+
* Set the user data field.
373+
*
374+
* The user data field allows for an application to associate a piece of arbitrary
375+
* data with a key and retrieve it later.
376+
* @param newData Data field to be saved.
377+
*/
378+
public void setUserData(Object newData) {
379+
UserData = newData;
380+
}
357381
}

0 commit comments

Comments
 (0)