cake_wallet/tool/utils/secret_key.dart
Omar Hatem 4d91ef6af8
App Center Integration with CI/CD workflow (#644)
Add Ionia client id to secrets
Update how to build android instructions
Change devicelocale version as it caused issues when building
Add trigger for send test build to transfer.sh and notify slack channel
2022-11-27 15:10:21 -05:00

36 lines
1.4 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', () => ''),
SecretKey('ioniaClientId', () => ''),
];
final String name;
final String Function() generate;
}