Encrypting a character string

Encrypt your passwords and sensitive data

The Encryption service displays the encryption operation of character strings.

Data Encryption

The examples below show how to secure a character string using the post operation.


# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN>      authentication token
# <MESSAGE>    character string to be encrypted, enclosed in double quotes

curl -X POST "<CORE_HOST>/rest/encrypt/" \
  -H "token: <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '"<MESSAGE>"'

@Autowired
private StringEncryptor encryptor;

@PostMapping
public String encrypt()
{
    return encryptor.encrypt("password");
}