Return List of Available Keys on NAE Server
An authenticated user has access to all global keys, all keys owned by the user, and all keys accessible to groups to which the user belongs.
Create an
NAESessionobject.Create an
NAEKeyarray.Populate the array with the elements returned by the
getKeysmethod of theNAEKeyclass. Pass theNAESessionobject as an argument.
Code sample
The following code sample returns a list of all global keys, all keys owned by user1, and all keys that are accessible to groups to which user1 belongs.
NAESession session = NAESession.getSession("user1" ,"password1".toCharArray());
NAEKey[] keys = NAEKey.getKeys(session);
The getKeys() method returns key handles, not key bytes. To access key bytes, use the export() method.