| Package | Description |
|---|---|
| com.cosmian.jna.abe | |
| com.cosmian.jna.findex | |
| com.cosmian.jna.findex.Callbacks |
| Modifier and Type | Method and Description |
|---|---|
int |
Ffi.createDecryptionCache(byte[] userDecryptionKeyBytes)
Create a decryption cache that can be used with
Ffi.decryptHeaderUsingCache(int, byte[]) Use of the cache
speeds up the decryption of the header. |
int |
Ffi.createDecryptionCache(PrivateKey userDecryptionKey)
Create an decryption cache that can be used with
Ffi.decryptHeaderUsingCache(int, byte[]) Use of the cache
speeds up decryption of the header WARN: the cache MUST be destroyed after use with
Ffi.destroyDecryptionCache(int) |
int |
Ffi.createEncryptionCache(Policy policy,
byte[] publicKeyBytes)
Create an encryption cache that can be used with
Ffi.encryptHeaderUsingCache(int, Attr[]) Use of the cache
speeds up the encryption of the header. |
int |
Ffi.createEncryptionCache(PublicKey publicKey)
Create an encryption cache that can be used with
Ffi.encryptHeaderUsingCache(int, Attr[]) se of the cache
speeds up the encryption of the header. |
byte[] |
Ffi.decryptBlock(byte[] symmetricKey,
byte[] encryptedBytes)
Symmetrically decrypt a block of encrypted data.
|
byte[] |
Ffi.decryptBlock(byte[] symmetricKey,
byte[] uid,
int blockNumber,
byte[] encryptedBytes)
Symmetrically decrypt a block of encrypted data.
|
DecryptedHeader |
Ffi.decryptHeader(byte[] userDecryptionKeyBytes,
byte[] encryptedHeaderBytes,
int uidLen,
int additionalDataLen)
Decrypt a hybrid header, recovering the symmetric key, and optionally, the resource UID and additional data
|
DecryptedHeader |
Ffi.decryptHeader(PrivateKey userDecryptionKey,
byte[] encryptedHeaderBytes)
Decrypt a hybrid header, recovering the symmetric key
|
DecryptedHeader |
Ffi.decryptHeader(PrivateKey userDecryptionKey,
byte[] encryptedHeaderBytes,
int uidLen,
int additionalDataLen)
Decrypt a hybrid header, recovering the symmetric key, and optionally, the resource UID and additional data
|
DecryptedHeader |
Ffi.decryptHeaderUsingCache(int cacheHandle,
byte[] encryptedHeaderBytes)
Decrypt a hybrid header using a cache, recovering the symmetric key
|
DecryptedHeader |
Ffi.decryptHeaderUsingCache(int cacheHandle,
byte[] encryptedHeaderBytes,
int uidLen,
int additionalDataLen)
Decrypt a hybrid header using a cache, recovering the symmetric key, and optionally, the resource UID and
additional data
|
void |
Ffi.destroyDecryptionCache(int cacheHandle)
Destroy the cache created with
Ffi.createDecryptionCache(byte[]) |
void |
Ffi.destroyEncryptionCache(int cacheHandle)
Destroy the cache created with
Ffi.createEncryptionCache(Policy, byte[]) |
byte[] |
Ffi.encryptBlock(byte[] symmetricKey,
byte[] clearText)
Symmetrically encrypt a block of clear text data.
|
byte[] |
Ffi.encryptBlock(byte[] symmetricKey,
byte[] uid,
int blockNumber,
byte[] clearText)
Symmetrically encrypt a block of clear text data.
|
EncryptedHeader |
Ffi.encryptHeader(Policy policy,
byte[] publicKeyBytes,
Attr[] attributes,
Optional<byte[]> uid,
Optional<byte[]> additionalData)
Generate an hybrid encryption header.
|
EncryptedHeader |
Ffi.encryptHeader(PublicKey publicKey,
Attr[] attributes)
Generate an hybrid encryption header.
|
EncryptedHeader |
Ffi.encryptHeader(PublicKey publicKey,
Attr[] attributes,
Optional<byte[]> uid,
Optional<byte[]> additionalData)
Generate an hybrid encryption header.
|
EncryptedHeader |
Ffi.encryptHeaderUsingCache(int cacheHandle,
Attr[] attributes)
Generate an hybrid encryption header using a pre-cached Public Key and Policy.
|
EncryptedHeader |
Ffi.encryptHeaderUsingCache(int cacheHandle,
Attr[] attributes,
Optional<byte[]> uid,
Optional<byte[]> additionalData)
Generate an hybrid encryption header using a pre-cached Public Key and Policy.
|
MasterKeys |
Ffi.generateMasterKeys(Policy policy)
Generate the master private and public keys using the ABE policy
|
byte[] |
Ffi.generateUserPrivateKey(byte[] masterPrivateKey,
AccessPolicy accessPolicy,
Policy policy)
Generate the user private key
|
String |
Ffi.get_last_error()
Return the last error in a String that does not exceed 1023 bytes
|
String |
Ffi.get_last_error(int max_len)
Return the last error in a String that does not exceed `max_len` bytes
|
Policy |
Ffi.rotateAttributes(Attr[] attributes,
Policy policy)
Rotate attributes, changing their underlying value with that of an unused slot
|
void |
Ffi.set_error(String error_msg)
Set the last error on the native lib
|
void |
Ffi.unwrap(int result)
If the result of the last FFI call is in Error, recover the last error from the native code and throw an
exception wrapping it.
|
| Modifier and Type | Method and Description |
|---|---|
int |
FfiWrapper.UpsertEntryCallback.apply(com.sun.jna.Pointer entries,
int entriesLength) |
int |
FfiWrapper.UpsertChainCallback.apply(com.sun.jna.Pointer chains,
int chainsLength) |
boolean |
FfiWrapper.ProgressCallback.apply(com.sun.jna.Pointer output,
int outputSize) |
int |
FfiWrapper.FetchAllEntryCallback.apply(com.sun.jna.Pointer output,
com.sun.jna.ptr.IntByReference outputSize,
int numberOfEntries) |
int |
FfiWrapper.FetchEntryCallback.apply(com.sun.jna.Pointer output,
com.sun.jna.ptr.IntByReference outputSize,
com.sun.jna.Pointer uidsPointer,
int uidsLength) |
int |
FfiWrapper.FetchChainCallback.apply(com.sun.jna.Pointer output,
com.sun.jna.ptr.IntByReference outputSize,
com.sun.jna.Pointer uidsPointer,
int uidsLength) |
int |
FfiWrapper.ListRemovedLocationsCallback.apply(com.sun.jna.Pointer output,
com.sun.jna.ptr.IntByReference outputSize,
com.sun.jna.Pointer locations,
int locationsLength) |
int |
FfiWrapper.UpdateLinesCallback.apply(com.sun.jna.Pointer removedChains,
int removedChainsLength,
com.sun.jna.Pointer newEntries,
int newEntriesLength,
com.sun.jna.Pointer newChains,
int newChainsLength) |
static void |
Ffi.compact(int numberOfReindexingPhasesBeforeFullSet,
MasterKeys masterKeys,
byte[] label,
FfiWrapper.FetchEntryCallback fetchEntry,
FfiWrapper.FetchChainCallback fetchChain,
FfiWrapper.FetchAllEntryCallback fetchAllEntry,
FfiWrapper.UpdateLinesCallback updateLines,
FfiWrapper.ListRemovedLocationsCallback listRemovedLocations) |
HashMap<byte[],byte[]> |
FfiWrapper.FetchAllEntryInterface.fetch() |
HashMap<byte[],byte[]> |
FfiWrapper.FetchEntryInterface.fetch(List<byte[]> uids) |
HashMap<byte[],byte[]> |
FfiWrapper.FetchChainInterface.fetch(List<byte[]> uids) |
static String |
Ffi.get_last_error()
Return the last error in a String that does not exceed 1023 bytes
|
static String |
Ffi.get_last_error(int maxLen)
Return the last error in a String that does not exceed `max_len` bytes
|
static void |
Ffi.graph_upsert(MasterKeys masterKeys,
byte[] label,
HashMap<IndexedValue,Word[]> indexedValuesAndWords,
FfiWrapper.FetchEntryCallback fetchEntry,
FfiWrapper.UpsertEntryCallback upsertEntry,
FfiWrapper.UpsertChainCallback upsertChain) |
boolean |
FfiWrapper.ProgressInterface.list(List<byte[]> indexedValues) |
List<Location> |
FfiWrapper.ListRemovedLocationsInterface.list(List<Location> locations) |
static List<byte[]> |
Ffi.search(byte[] keyK,
byte[] label,
Word[] words,
int loopIterationLimit,
int maxDepth,
FfiWrapper.ProgressCallback progress,
FfiWrapper.FetchEntryCallback fetchEntry,
FfiWrapper.FetchChainCallback fetchChain) |
static void |
Ffi.set_error(String error_msg)
Set the last error on the native lib
|
static void |
Ffi.unwrap(int result)
If the result of the last FFI call is in Error, recover the last error from the native code and throw an
exception wrapping it.
|
void |
FfiWrapper.UpdateLinesInterface.update(List<byte[]> removedChains,
HashMap<byte[],byte[]> newEntries,
HashMap<byte[],byte[]> newChains) |
void |
FfiWrapper.UpsertEntryInterface.upsert(HashMap<byte[],byte[]> uidsAndValues) |
void |
FfiWrapper.UpsertChainInterface.upsert(HashMap<byte[],byte[]> uidsAndValues) |
static void |
Ffi.upsert(MasterKeys masterKeys,
byte[] label,
HashMap<IndexedValue,Word[]> indexedValuesAndWords,
FfiWrapper.FetchEntryCallback fetchEntry,
FfiWrapper.UpsertEntryCallback upsertEntry,
FfiWrapper.UpsertChainCallback upsertChain) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
Progress.apply(com.sun.jna.Pointer searchResultsPointer,
int searchResultsLength) |
int |
UpsertEntry.apply(com.sun.jna.Pointer items,
int itemsLength) |
int |
UpsertChain.apply(com.sun.jna.Pointer items,
int itemsLength) |
int |
FetchAllEntry.apply(com.sun.jna.Pointer output,
com.sun.jna.ptr.IntByReference outputSize,
int numberOfEntries) |
int |
ListRemovedLocations.apply(com.sun.jna.Pointer output,
com.sun.jna.ptr.IntByReference outputSize,
com.sun.jna.Pointer items,
int itemsLength) |
int |
FetchChain.apply(com.sun.jna.Pointer output,
com.sun.jna.ptr.IntByReference outputSize,
com.sun.jna.Pointer uidsPointer,
int uidsLength) |
int |
FetchEntry.apply(com.sun.jna.Pointer output,
com.sun.jna.ptr.IntByReference outputSize,
com.sun.jna.Pointer uidsPointer,
int uidsLength) |
int |
UpdateLines.apply(com.sun.jna.Pointer removedChainsPointer,
int removedChainsLength,
com.sun.jna.Pointer newEntriesPointer,
int newEntriesLength,
com.sun.jna.Pointer newChainsPointer,
int newChainsLength) |
Copyright © 2022. All rights reserved.