From 26019ac7041e04c0abb6ed34bf7e9c232295d868 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Tue, 2 Aug 2022 15:43:39 +0200 Subject: [PATCH] style: Move the X3DH info string into a constant --- lib/src/x3dh.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/x3dh.dart b/lib/src/x3dh.dart index 72feadd..2ec5283 100644 --- a/lib/src/x3dh.dart +++ b/lib/src/x3dh.dart @@ -6,6 +6,7 @@ import 'package:omemo_dart/src/errors.dart'; import 'package:omemo_dart/src/key.dart'; /// The overarching assumption is that we use Ed25519 keys for the identity keys +const omemoX3DHInfoString = 'OMEMO X3DH'; /// Performed by Alice class X3DHAliceResult { @@ -81,7 +82,7 @@ Future> kdf(List km) async { final output = await algorithm.deriveKey( secretKey: SecretKey(input), nonce: List.filled(32, 0x00), - info: utf8.encode('OMEMO X3DH'), + info: utf8.encode(omemoX3DHInfoString), ); return output.extractBytes();