2021-03-16 13:20:46 +00:00
|
|
|
import 'package:encrypt/encrypt.dart' as encrypt;
|
|
|
|
import 'package:convert/convert.dart';
|
|
|
|
|
|
|
|
class SecretKey {
|
|
|
|
const SecretKey(this.name, this.generate);
|
|
|
|
|
|
|
|
static final base = [
|
|
|
|
SecretKey('salt', () => hex.encode(encrypt.Key.fromSecureRandom(16).bytes)),
|
|
|
|
SecretKey('keychainSalt',
|
|
|
|
() => hex.encode(encrypt.Key.fromSecureRandom(12).bytes)),
|
|
|
|
SecretKey('key', () => hex.encode(encrypt.Key.fromSecureRandom(16).bytes)),
|
|
|
|
SecretKey(
|
|
|
|
'walletSalt', () => hex.encode(encrypt.Key.fromSecureRandom(4).bytes)),
|
|
|
|
SecretKey(
|
|
|
|
'shortKey', () => hex.encode(encrypt.Key.fromSecureRandom(12).bytes)),
|
|
|
|
SecretKey(
|
|
|
|
'backupSalt', () => hex.encode(encrypt.Key.fromSecureRandom(8).bytes)),
|
|
|
|
SecretKey('backupKeychainSalt',
|
|
|
|
() => hex.encode(encrypt.Key.fromSecureRandom(12).bytes)),
|
|
|
|
SecretKey('changeNowApiKey', () => ''),
|
|
|
|
SecretKey('wyreSecretKey', () => ''),
|
|
|
|
SecretKey('wyreApiKey', () => ''),
|
|
|
|
SecretKey('wyreAccountId', () => ''),
|
2021-12-28 17:00:57 +00:00
|
|
|
SecretKey('moonPayApiKey', () => ''),
|
|
|
|
SecretKey('moonPaySecretKey', () => ''),
|
2022-04-13 13:28:21 +00:00
|
|
|
SecretKey('sideShiftAffiliateId', () => ''),
|
|
|
|
SecretKey('sideShiftApiKey', () => ''),
|
2022-10-27 21:33:58 +00:00
|
|
|
SecretKey('simpleSwapApiKey', () => ''),
|
2022-11-03 20:53:33 +00:00
|
|
|
SecretKey('anypayToken', () => ''),
|
2022-10-27 21:33:58 +00:00
|
|
|
SecretKey('onramperApiKey', () => ''),
|
2022-11-27 20:10:21 +00:00
|
|
|
SecretKey('ioniaClientId', () => ''),
|
2023-02-06 19:20:43 +00:00
|
|
|
SecretKey('trocadorApiKey', () => ''),
|
2021-03-16 13:20:46 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
final String name;
|
|
|
|
final String Function() generate;
|
|
|
|
}
|