public class AESUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_STRENGTH |
| Constructor and Description |
|---|
AESUtils() |
| Modifier and Type | Method and Description |
|---|---|
static javax.crypto.SecretKey |
decodeSecretKey(byte[] rawKey) |
static javax.crypto.SecretKey |
decodeSecretKey(java.lang.String encKey) |
static java.lang.String |
encodeKey(java.security.Key key) |
static byte[] |
getIV(io.nessus.Wallet.Address addr,
io.ipfs.multihash.Multihash cid)
Create an AES initialization vector derived from the owner's private key and a content id.
|
static javax.crypto.SecretKey |
newSecretKey()
Generate the secret key from a random source.
|
static javax.crypto.SecretKey |
newSecretKey(io.nessus.Wallet.Address addr)
Create an AES secret key derived from the owner's private key.
|
static javax.crypto.SecretKey |
newSecretKey(io.nessus.Wallet.Address addr,
io.ipfs.multihash.Multihash cid)
Create an AES secret key derived from the owner's private key and some content id.
|
static javax.crypto.SecretKey |
newSecretKey(io.nessus.Wallet.Address addr,
io.ipfs.multihash.Multihash cid,
int strength) |
public static final int DEFAULT_STRENGTH
public static javax.crypto.SecretKey newSecretKey()
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic static javax.crypto.SecretKey newSecretKey(io.nessus.Wallet.Address addr)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic static javax.crypto.SecretKey newSecretKey(io.nessus.Wallet.Address addr,
io.ipfs.multihash.Multihash cid)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic static javax.crypto.SecretKey newSecretKey(io.nessus.Wallet.Address addr,
io.ipfs.multihash.Multihash cid,
int strength)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic static java.lang.String encodeKey(java.security.Key key)
public static javax.crypto.SecretKey decodeSecretKey(java.lang.String encKey)
public static javax.crypto.SecretKey decodeSecretKey(byte[] rawKey)
public static byte[] getIV(io.nessus.Wallet.Address addr,
io.ipfs.multihash.Multihash cid)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionCopyright © 2019. All rights reserved.