encrypt

Encrypt the provided token with security, and return the EncryptionResult.

Return

EncryptionResult containing the EncryptionResult.encryptedToken, and EncryptionResult.encryptionExtras containing encryption primitives for decryption (such as IV).

Parameters

token

the Token to be encrypted.

security

the Credential.Security to encrypt the token with.