public class Encrypto extends Object
| Constructor and Description |
|---|
Encrypto(String algo) |
Encrypto(String algo,
int bitLength) |
Encrypto(String algo,
String password) |
| Modifier and Type | Method and Description |
|---|---|
String |
decrypt(String value)
decrypt the encrypted message
|
String |
encrypt(String value)
encrypt the message with password.
|
String |
encrypt(String value,
ZotPublicKey publicKey)
encrypt the message using public key.
|
String |
getPrivateKeyString()
returns private key string
|
ZotPublicKey |
getPublicKey()
sends back the respective public key
|
static ZotPublicKey |
getPublicKey(String base64PublicKey)
used to convert the client's public key to the ZotPublicKey class instance.
|
String |
getPublicKeyString()
returns public key string
|
String |
getSterilizedPublicKey()
returns sterilized public key to be sent to the client.
|
public static final String RSA
public static final String DES
public Encrypto(String algo)
algo - "RSA" and "DES" are only supported currently.public Encrypto(String algo, int bitLength)
algo - "RSA" and "DES" are only supported currently.bitLength - it's the keysize that's used to generate keys for encryption/decryptionpublic ZotPublicKey getPublicKey()
public static ZotPublicKey getPublicKey(String base64PublicKey)
public String getSterilizedPublicKey()
public String getPrivateKeyString()
public String getPublicKeyString()
public String encrypt(String value, ZotPublicKey publicKey)
Copyright © 2022. All rights reserved.