Class StringEncryptor

    • Constructor Detail

      • StringEncryptor

        public StringEncryptor​(BytesEncryptor encryptor)
    • Method Detail

      • isEncrypted

        public boolean isEncrypted​(String message)
        Description copied from interface: Encryptor
        Check whether the given message is already encrypted or not.
        Specified by:
        isEncrypted in interface Encryptor<String,​String>
        Parameters:
        message - the message to check
        Returns:
        true if encrypted
      • encrypt

        public String encrypt​(String message)
        Description copied from interface: Encryptor
        Encrypt the given message.
        Specified by:
        encrypt in interface Encryptor<String,​String>
        Parameters:
        message - the message to encrypt
        Returns:
        encrypted message
      • decrypt

        public String decrypt​(String encryptedMessage)
        Description copied from interface: Encryptor
        Decrypt the given encrypted message.
        Specified by:
        decrypt in interface Encryptor<String,​String>
        Parameters:
        encryptedMessage - the encrypted message to decrypt
        Returns:
        decrypted message