get method
get the cookie to response in http response
cookie.get();
https sets Secure when secure is null.
the cookie name is bound to the encrypted value, so the value can
not be copied to another cookie.
Implementation
String get({bool https = false}) {
String val = encrypt
? AESEncryptor.encode(
value,
Dox().config.appKey,
associatedData: key,
purpose: KeyDerivation.cookie,
)
: value;
Cookie cookie = Cookie(key, val);
cookie.maxAge = maxAge.inSeconds;
_apply(cookie, https);
return cookie.toString();
}