Package org.nuxeo.common.codec
Class Crypto.NoOp
- java.lang.Object
-
- org.nuxeo.common.codec.Crypto
-
- org.nuxeo.common.codec.Crypto.NoOp
-
- Enclosing class:
- Crypto
public static final class Crypto.NoOp extends Crypto
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.nuxeo.common.codec.Crypto
Crypto.NoOp
-
-
Field Summary
Fields Modifier and Type Field Description static CryptoNO_OP-
Fields inherited from class org.nuxeo.common.codec.Crypto
AES, AES_ECB_PKCS5PADDING, CRYPTO_PATTERN, DEFAULT_ALGO, DES, DES_ECB_PKCS5PADDING, IMPLEMENTED_ALGOS
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear sensible values.byte[]decrypt(String strToDecrypt)The method returns either the decryptedstrToDecrypt, either thestrToDecryptitself if it is not recognized as a crypted string or if the decryption fails.Stringencrypt(String algorithm, byte[] bytesToEncrypt)-
Methods inherited from class org.nuxeo.common.codec.Crypto
encrypt, getBytes, getChars, getKeysFromKeyStore, getSecretKey, getSHA1Digest, getSHA1DigestOrEmpty, isEncrypted, setKeyInKeyStore, verifyKey, verifyKey
-
-
-
-
Method Detail
-
encrypt
public String encrypt(String algorithm, byte[] bytesToEncrypt)
- Overrides:
encryptin classCrypto- Parameters:
algorithm- cipher transformation of the form "algorithm/mode/padding" or "algorithm". See the Cipher section in the Java Cryptography Architecture Standard Algorithm Name Documentation.
-
decrypt
public byte[] decrypt(String strToDecrypt)
Description copied from class:CryptoThe method returns either the decryptedstrToDecrypt, either thestrToDecryptitself if it is not recognized as a crypted string or if the decryption fails. The return value is a byte array for security purpose, it is your responsibility to convert it then to a String or not (use ofchar[]is recommended).- Overrides:
decryptin classCrypto- Returns:
- the decrypted
strToDecryptas an array of bytes, nevernull - See Also:
Crypto.getChars(byte[])
-
-