encode method
Encodes values
Implementation
String encode(Map<String, String> values) {
// Map data to String
String value = json.encode(values);
// Encrypt the data
if (encrypter != null) {
value = encrypter!.encode(value);
}
// Base64 URL safe encoding
String ret = base64UrlEncode(value.codeUnits);
if (signer == null) {
return ret;
}
// Sign it!
return ret + '.' + base64UrlEncode(signer!.convert(ret.codeUnits).bytes);
}