@SymmetricKey()
New in 2.0Generate symmetric encryption key
CipherSince 2.0.0
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| algorithm | — | — | Generation algorithm, e.g., RSA, EC, DSA |
Usage
@SymmetricKey()Generate default AES algorithm encryption key
Example:
@SymmetricKey()
Output:
wCnChNn+2WSH6saSatASL+3Bo3HcW8uEz8jHqM7TtQs=/IWyWbP42jcWFB47zmLCfWVGK6nnRkrBM/dJqnRt+bU=@SymmetricKey(arg0)Generate encryption key with specified algorithm
Example:
@SymmetricKey(AES)
Output:
wiuUG5/rfxB1r9VtxfgO1jy1TLyAmo5xFBm7iOPosAs=zHexV+cHC3O9T70eU2FEgSsFTfOmOsD/lJfGQOj90Aw=