DummyCastle class

author polinc

Constructors

DummyCastle()

Properties

cryptSymmKey CryptSymmKey
getter/setter pair
error bool
getter/setter pair
exception Exception
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
resultBytes List<int>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decodeWith(String encodedText) DummyCastle
Decodes a text using HEX encoding. The result may be obtained using getResult().
decryptAsymmWith(String secretText, CryptAsymmKey key) DummyCastle
Decrypts provided text using asymmetric encryption. The result may be obtained using getResult() method and it is not encoded.
decryptAsymmWithKey(CryptAsymmKey key) DummyCastle
Decrypts dta internally using asymmetric encryption. The result may be obtained using getResult() method and it is not encoded.
decryptSymm() DummyCastle
Decrypts internally a text provided by previous operations using symmetric encryption. The result may be obtained using getResult() method and it is not encoded.
decryptSymmFromWith(String secretText, int keyPos) DummyCastle
Decodes and decrypts provided text using symmetric encryption. The result may be obtained using getResult() method.
decryptSymmWith(String secretText) DummyCastle
Decrypts provided plain text using symmetric encryption. The result may be obtained using getResult() method and it is not encoded.
encodeWith(String textToDecode) String
Encodes a text using HEX encoding. The result may be obtained using getResult() method.
encryptAsymmWith(String plainText, CryptAsymmKey key) DummyCastle
Encrypts provided text using asymmetric encryption. The result may be obtained using getResult() method and it is not encoded. Use decryptSymm() to decrypt the result. Use decryptAsymm() to decrypt.
encryptAsymmWithKey(CryptAsymmKey key) DummyCastle
Encrypts data internally using asymmetric encryption. The result may be obtained using getResult() method and it is not encoded. Use decryptSymm() to decrypt the result. Use decryptAsymm() to decrypt.
encryptSymm() DummyCastle
Encrypts internally a text provided by a previous operation using symmetric encryption. The result may be obtained using getResult() method and it is not encoded. Use decryptSymm() do decrypt the result.
encryptSymmFromWith(String plainText, int keyPos) DummyCastle
Encrypts provided plain text using symmetric encryption. The result may be obtained using getResult() method.
encryptSymmWith(String plainText) DummyCastle
Encrypts provided plain text using symmetric encryption. The result may be obtained using getResult() method and it is not encoded. Use decryptSymm() do decrypt the result.
fromBytesDecoded(List<int> plainText) DummyCastle
Inserts unencoded raw byte data to work on it.
fromBytesEncoded(List<int> plainText) DummyCastle
Inserts encoded with the library's default encoding byte data to work on it.
fromStringDecoded(String plainText) DummyCastle
Inserts unencoded raw string data to work on it.
fromStringEncoded(String plainText) DummyCastle
Inserts encoded with the library's default encoding string data to work on it.
genAsymmKeys() CryptAsymmKeysPair
Generates a pair of keys for the purpose of asymmetric encryption.
genAsymmKeysWithKeySizeType(ASYMM_KEY_SIZE_TYPE keySizeType) CryptAsymmKeysPair
Generates a pair of keys for the purpose of asymmetric encryption of the specified size.
genAsymmPrivateKeyWith(String keyData) CryptAsymmPrivateKey
Generates a private key for the purpose of asymmetric encryption.
genAsymmPublicKeyWith(String keyData) CryptAsymmPublicKey
Generates a public key for the purpose of asymmetric encryption.
genSymmKey() DummyCastle
Generates a default key for the purpose of symmetric encryption. The key may be obtained using getSymmKey() method.
genSymmKeyWith(String keySeed) DummyCastle
Generates a key based on provided seed data for the purpose of symmetric encryption.
getException() Exception
return exception that was thrown during any of previous operation.
getResult() String
return results of all operations encoded using the default encoding - HEX. The same as toString(). If no operation is executed the result will be an empty string.
getResultDecoded() String
Returns unencoded raw string data which is a result of library's operations
getResultDecodedRaw() List<int>
Returns unencoded raw byte data which is a result of library's operations
getSymmKey() CryptSymmKey
Retrieves a key that was previously generated using genSymmKey() method for the purpose of symmetric encryption. If the genSymmKey() has not been called before this method, it generates a default key.
hashToNum() DummyCastle
Hashes(reduces) a text internally into a long number represented as a string. The result may be obtained using getResult() method.
hashToNumWith(String textToHash) DummyCastle
Hashes(reduces) a provided text into a long number represented as a string.
hashToStr() DummyCastle
Hashes(reduces) a text internally into a string. The result may be obtained using getResult() method.
hashToStrWith(String textToHash) DummyCastle
Hashes(reduces) a provided text into a 8 characters string. The result may be obtained using getResult() method.
hashToStrWithLength(int lengthInChars) DummyCastle
Hashes(reduces) a text internally into a string. The result may be obtained using getResult() method.
hashToStrWithTextAndLength(String textToHash, int lengthInChars) DummyCastle
Hashes(reduces) a provided text into a 8 characters string. The result may be obtained using getResult() method.
isError() bool
return true if an exception was thrown during any of previous operation. Check this flag and use getException() to get the exception.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
obfuscate() DummyCastle
Obfuscates(hides) a text internally. The result may be obtained using getResult() method.
obfuscateWith(String textToObfuscate) DummyCastle
Obfuscates(hide) a provided text. The result may be obtained using getResult() method. Use unobfuscate() method to reveal the text.
randomDeterministicNumFromWith(String seed, int lengthInDigits, int resPos) DummyCastle
Generates a random numeric value as a string based on a provided seed which guarantees the result will be always the same if you provide the method with the same seed(idepotency). The result is generated from a certain point. The result may be obtained using getResult() method.
randomDeterministicNumWith(String seed, int lengthInDigits) DummyCastle
Generates a random numeric value as a string based on a provided seed which guarantees the result will be always the same if you provide the method with the same seed(idepotency). The result may be obtained using getResult() method.
randomDeterministicStrFromWith(String seed, int lengthInChars, int keyPos) DummyCastle
Generates a string based on a provided seed which guarantees the result will be always the same if you provide the method with the same seed(idepotency). The result is generated from certain point. The result may be obtained using getResult() method.
randomDeterministicStrWith(String seed, int lengthInChars) DummyCastle
Generates a random numeric value as a string based on a provided seed which guarantees the result will be always the same if you provide the method with the same seed(idepotency). The result may be obtained using getResult() method.
randomNumWith(int lengthInDigits) DummyCastle
Generates a random numeric value as a string. No negative nor leading zero. The result may be obtained using getResult() method.
randomStrWith(int lengthInChars) DummyCastle
Generates a random string. The result may be obtained using getResult() method.
reset() → void
Resets the whole object and cleans its memory. Resets also the error flag.
setUpError(Exception e) → void
Prepares exception param e exception to setup
shuffle() DummyCastle
Shuffles randomly characters internally.
shuffleDeterministic(String seed) DummyCastle
Shuffles characters internally based on a provided seed. It always provides the same result give the same input data.
shuffleDeterministicWith(String textToShuffle, String seed) DummyCastle
Shuffles characters in a text based on a provided seed. It always provides the same result give the same input data.
shuffleWith(String textToShuffle) DummyCastle
Shuffles randomly characters in a text.
toString() String
return results of all operations. Encoded with default encoding method - HEX. The same as toString(). If not operation is executed the result will be an empty string. The same as getResult()
override
toStringDecoded() String
Returns unencoded data being as a string. It is a result of all operations.
unobfuscate() DummyCastle
Unobfuscates(reveals) a text provided by a previous operation. The result may be obtained using getResult() method.
unobfuscateWith(String obfuscatedText) DummyCastle
Unobfuscates(reveals) a provided text. The result may be obtained using getResult() method.

Operators

operator ==(Object other) bool
The equality operator.
inherited