style: Move the X3DH info string into a constant
This commit is contained in:
parent
4211775c90
commit
26019ac704
@ -6,6 +6,7 @@ import 'package:omemo_dart/src/errors.dart';
|
|||||||
import 'package:omemo_dart/src/key.dart';
|
import 'package:omemo_dart/src/key.dart';
|
||||||
|
|
||||||
/// The overarching assumption is that we use Ed25519 keys for the identity keys
|
/// The overarching assumption is that we use Ed25519 keys for the identity keys
|
||||||
|
const omemoX3DHInfoString = 'OMEMO X3DH';
|
||||||
|
|
||||||
/// Performed by Alice
|
/// Performed by Alice
|
||||||
class X3DHAliceResult {
|
class X3DHAliceResult {
|
||||||
@ -81,7 +82,7 @@ Future<List<int>> kdf(List<int> km) async {
|
|||||||
final output = await algorithm.deriveKey(
|
final output = await algorithm.deriveKey(
|
||||||
secretKey: SecretKey(input),
|
secretKey: SecretKey(input),
|
||||||
nonce: List<int>.filled(32, 0x00),
|
nonce: List<int>.filled(32, 0x00),
|
||||||
info: utf8.encode('OMEMO X3DH'),
|
info: utf8.encode(omemoX3DHInfoString),
|
||||||
);
|
);
|
||||||
|
|
||||||
return output.extractBytes();
|
return output.extractBytes();
|
||||||
|
Loading…
Reference in New Issue
Block a user