public interface MessageEncryption
| Modifier and Type | Method and Description |
|---|---|
String |
encodeBytes(byte[] bytes)
This method encodes a byte array into a base 64 string.
|
CipherOutputStream |
encryptionOutputStream(SecretKey sharedKey,
OutputStream output)
This method generates an output stream that performs encryption on another output stream.
|
byte[] |
encryptSharedKey(PublicKey certificate,
SecretKey sharedKey)
This method encrypts a shared key using the public certificate of the destination for a data stream that will
be encrypted using the shared key.
|
void |
encryptStream(SecretKey sharedKey,
InputStream input,
OutputStream output)
This method encrypts a byte stream using a shared key.
|
byte[] |
encryptString(SecretKey sharedKey,
String string)
This method encrypts a string using a shared key.
|
SecretKey |
generateSharedKey()
This method generates a shared (secret) key to be used for encrypting
large amounts of data.
|
String |
getAsymmetricEncryptionAlgorithm()
This method returns the asymmetric encryption algorithm used by this cryptex.
|
String |
getAsymmetricSignatureAlgorithm()
This method returns the asymmetric signature algorithm used by this cryptex.
|
String |
getEncodingType()
This method returns the encoding type supported by this cryptex.
|
String |
getHashAlgorithm()
This method returns the hash algorithm.
|
String |
getSymmetricEncryptionAlgorithm()
This method returns the symmetric encryption algorithm used by this cryptex.
|
int |
getSymmetricKeySize()
This method returns the symmetric key size used by this cryptex.
|
String |
hashString(String string)
This method returns a base 64 encoded SHA256 one-way hash of the specified string.
|
byte[] |
signBytes(PrivateKey privateKey,
byte[] bytes)
This method signs a byte array.
|
String getEncodingType()
String getHashAlgorithm()
String getAsymmetricSignatureAlgorithm()
String getAsymmetricEncryptionAlgorithm()
String getSymmetricEncryptionAlgorithm()
int getSymmetricKeySize()
String encodeBytes(byte[] bytes)
bytes - The byte array to be encoded.byte[] signBytes(PrivateKey privateKey, byte[] bytes)
privateKey - The private key used for signing.bytes - The byte array to be signed.SecretKey generateSharedKey()
byte[] encryptSharedKey(PublicKey certificate, SecretKey sharedKey)
certificate - The public certificate of the destination.sharedKey - The shared key to be encrypted.byte[] encryptString(SecretKey sharedKey, String string)
sharedKey - The shared key used for the encryption.string - The string to be encrypted.void encryptStream(SecretKey sharedKey, InputStream input, OutputStream output) throws IOException
sharedKey - The shared key used for the encryption.input - The byte stream to be encrypted.output - The encrypted output stream.IOException - Unable to encrypt the stream.CipherOutputStream encryptionOutputStream(SecretKey sharedKey, OutputStream output) throws IOException
sharedKey - The shared key used for the encryption.output - The output stream to be encrypted.IOException - Unable to create an encryption output stream.Copyright © 2015 Crater Dog Technologies(TM). All rights reserved.