Skip to content

Commit 3d9e446

Browse files
committed
wip rearrange bouncer key a bit
1 parent 27f3723 commit 3d9e446

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/model/push_device.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ class PushDeviceManager extends PerAccountStoreBase {
202202
_ => throw StateError('unexpected platform: $defaultTargetPlatform'),
203203
};
204204

205-
final bouncerPublicKey = 'nonsense-bouncer-key'; // TODO(#1764) fill in
206205
final pushRegistration = PushRegistration(
207206
tokenKind: tokenKind, token: token,
208207
timestamp: timestamp);
@@ -212,8 +211,8 @@ class PushDeviceManager extends PerAccountStoreBase {
212211
tokenKind: tokenKind,
213212
pushAccountId: pushAccountId,
214213
pushPublicKey: base64Encode(pushKey),
215-
bouncerPublicKey: bouncerPublicKey,
216-
encryptedPushRegistration: _encryptToBouncer(bouncerPublicKey,
214+
bouncerPublicKey: _bouncerPublicKey,
215+
encryptedPushRegistration: _encryptToBouncer(_bouncerPublicKey,
217216
jsonEncode(pushRegistration)),
218217
);
219218
} finally {
@@ -226,8 +225,10 @@ class PushDeviceManager extends PerAccountStoreBase {
226225
// and show warning if not confirmed there
227226
}
228227

228+
static const _bouncerPublicKey = 'nonsense-bouncer-key'; // TODO(#1764) fill in
229+
229230
static String _encryptToBouncer(String publicKey, String plaintext) {
230-
return 'SEKRIT don\'t peek: $plaintext END-SEKRIT'; // TODO(#1764)
231+
return 'SEKRIT nobody peek except $publicKey BODY $plaintext END-SEKRIT'; // TODO(#1764)
231232
}
232233

233234
Future<void> _legacyRegisterToken(String token) async {

0 commit comments

Comments
 (0)