public final class ForwardSecrecyUtility extends Object
Modifier and Type | Field and Description |
---|---|
static int |
CIPHER_LENGTH |
static int |
CIPHER_UID_LENGTH |
static int |
CIPHER_UID_TIMESTAMP_LENGTH |
static int |
MESSAGE_LENGTH |
Modifier and Type | Method and Description |
---|---|
static String |
createCipher()
Default way on how to create a cipher.
|
static String |
createCipherUid()
Default way on how to create a cipher UID.
|
static String |
createMessage()
Default way on how to create a message which is to be signed in order to
identify the owner of a public key.
|
static boolean |
hasEncryptionPattern(String aText)
Returns true in case the given text provided the characteristics of an
encrypted text as of the cipher and cipher UID pattern.
-------------------------------------------------------------------------
CAUTION: A plain text may have the same characteristics, an encrypted
text must have these characteristics!
|
static String |
toCipherUidPrefix(String aCipherUidWithEncryptedText)
Expects a text with a prefixed cipher UID.
|
static String |
toEncryptedTextBody(String aCipherUidWithEncryptedText)
Expects a text with a prefixed cipher UID.
|
public static final int CIPHER_UID_TIMESTAMP_LENGTH
public static final int CIPHER_UID_LENGTH
public static final int CIPHER_LENGTH
public static final int MESSAGE_LENGTH
public static boolean hasEncryptionPattern(String aText)
aText
- The text to test whether it is encrypted.public static String toCipherUidPrefix(String aCipherUidWithEncryptedText)
aCipherUidWithEncryptedText
- The encrypted text with the prefixed
cipher UIDpublic static String toEncryptedTextBody(String aCipherUidWithEncryptedText)
aCipherUidWithEncryptedText
- The encrypted text with the prefixed
cipher UIDpublic static String createCipherUid()
public static String createCipher()
public static String createMessage()
Copyright © 2016. All rights reserved.