mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-01 01:47:41 +00:00
30bac3cb6c
* Add AnyPay token for interacting with the AnyPay API for Cake Pay payments * Add missing commas Co-authored-by: mkyq <53115730+mkyq@users.noreply.github.com>
35 lines
1.3 KiB
Dart
35 lines
1.3 KiB
Dart
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', () => ''),
|
|
SecretKey('moonPayApiKey', () => ''),
|
|
SecretKey('moonPaySecretKey', () => ''),
|
|
SecretKey('sideShiftAffiliateId', () => ''),
|
|
SecretKey('sideShiftApiKey', () => ''),
|
|
SecretKey('simpleSwapApiKey', () => ''),
|
|
SecretKey('anypayToken', () => ''),
|
|
SecretKey('onramperApiKey', () => ''),
|
|
];
|
|
|
|
final String name;
|
|
final String Function() generate;
|
|
}
|