public abstract class MessageCryptex extends Object implements MessageEncryption, MessageDecryption
| Constructor and Description |
|---|
MessageCryptex() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decodeString(String base64String)
This method decodes a base 64 string into its original bytes.
|
void |
decryptStream(SecretKey sharedKey,
InputStream input,
OutputStream output)
This method decrypts a byte stream from an encrypted byte stream.
|
String |
decryptString(SecretKey sharedKey,
byte[] encryptedString)
This method decrypts a string using a shared key.
|
String |
encodeBytes(byte[] bytes)
This method encodes a byte array into a base 64 string.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitencryptionOutputStream, encryptSharedKey, generateSharedKey, getAsymmetricEncryptionAlgorithm, getAsymmetricSignatureAlgorithm, getEncodingType, getHashAlgorithm, getSymmetricEncryptionAlgorithm, getSymmetricKeySize, hashString, signBytesbytesAreValid, decryptionInputStream, decryptSharedKeypublic final String encodeBytes(byte[] bytes)
MessageEncryptionencodeBytes in interface MessageEncryptionbytes - The byte array to be encoded.public final byte[] decodeString(String base64String)
MessageDecryptiondecodeString in interface MessageDecryptionbase64String - The base 64 encoded string.public void encryptStream(SecretKey sharedKey, InputStream input, OutputStream output) throws IOException
MessageEncryptionencryptStream in interface MessageEncryptionsharedKey - 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.public void decryptStream(SecretKey sharedKey, InputStream input, OutputStream output) throws IOException
MessageDecryptiondecryptStream in interface MessageDecryptionsharedKey - The shared key used for the encryption.input - The encrypted byte stream.output - The decrypted byte stream.IOException - Unable to decrypt the stream.public byte[] encryptString(SecretKey sharedKey, String string)
MessageEncryptionencryptString in interface MessageEncryptionsharedKey - The shared key used for the encryption.string - The string to be encrypted.public String decryptString(SecretKey sharedKey, byte[] encryptedString)
MessageDecryptiondecryptString in interface MessageDecryptionsharedKey - The shared key used for the encryption.encryptedString - The encrypted string.Copyright © 2015 Crater Dog Technologies(TM). All rights reserved.