net.named_data.jndn.encrypt.algo
public class Encryptor extends Object
Modifier and Type | Field and Description |
---|---|
static Name.Component |
NAME_COMPONENT_ACCESS |
static Name.Component |
NAME_COMPONENT_C_KEY |
static Name.Component |
NAME_COMPONENT_D_KEY |
static Name.Component |
NAME_COMPONENT_E_KEY |
static Name.Component |
NAME_COMPONENT_FOR |
static Name.Component |
NAME_COMPONENT_READ |
static Name.Component |
NAME_COMPONENT_SAMPLE |
Constructor and Description |
---|
Encryptor() |
Modifier and Type | Method and Description |
---|---|
static void |
encryptData(Data data,
Blob payload,
Name keyName,
Blob key,
EncryptParams params)
Prepare an encrypted data packet by encrypting the payload using the key
according to the params.
|
public static final Name.Component NAME_COMPONENT_FOR
public static final Name.Component NAME_COMPONENT_READ
public static final Name.Component NAME_COMPONENT_SAMPLE
public static final Name.Component NAME_COMPONENT_ACCESS
public static final Name.Component NAME_COMPONENT_E_KEY
public static final Name.Component NAME_COMPONENT_D_KEY
public static final Name.Component NAME_COMPONENT_C_KEY
public static void encryptData(Data data, Blob payload, Name keyName, Blob key, EncryptParams params) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, InvalidAlgorithmParameterException, InvalidKeySpecException
data
- The data packet which is updated.payload
- The payload to encrypt.keyName
- The key name for the EncryptedContent.key
- The encryption key value.params
- The parameters for encryption.NoSuchAlgorithmException
NoSuchPaddingException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
InvalidAlgorithmParameterException
InvalidKeySpecException
Copyright © 2016. All rights reserved.