Dewif class

Constructors

Dewif()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

byteXor(Uint8List data, Uint8List key) Uint8List
Binary XOR encryption
cesiumSeedFromDewif(String dewif, String password, {int dewifCurrencyCode = DEWIF_CURRENCY_CODE_G1, int dewifVersion = DEWIF_VERSION, bool test = false}) Uint8List
Decrypt the given Cesium DEWIF in base64 string format and associated password. Return error if DEWIF is corrupted, or the password is not the good one. If success, return seed.
changeCesiumPassword({required String dewif, required String oldPassword, String? newPassword, int dewifCurrencyCode = DEWIF_CURRENCY_CODE_G1, int dewifVersion = DEWIF_VERSION}) Future<NewWallet>
changePassword({required String dewif, required String oldPassword, String? newPassword, String lang = 'english', int dewifCurrencyCode = DEWIF_CURRENCY_CODE_G1, int dewifVersion = DEWIF_VERSION}) Future<NewWallet>
generateCesiumDewif(Uint8List seed, String password, {int dewifCurrencyCode = DEWIF_CURRENCY_CODE_G1, int dewifVersion = DEWIF_VERSION, bool test = false}) Future<NewWallet>
Return the base64 DEWIF string generated from given seed and password.
generateDewif(String mnemonic, String password, {String lang = 'english', int dewifCurrencyCode = DEWIF_CURRENCY_CODE_G1, int dewifVersion = DEWIF_VERSION, bool testRfc = false}) Future<NewWallet>
Return the base64 DEWIF string generated from given mnemonic and password. You can optionnaly specify a custom parameters, as language for mnemonic (default is enhlish) More detail in the Duniter RFC13: https://git.duniter.org/documents/rfcs/blob/master/rfc/0013_Duniter_Encrypted_Wallet_Import_Format.md
isNumeric(dynamic string) bool
mnemonicFromDewif(String dewif, String password, {String lang = 'english', int dewifCurrencyCode = DEWIF_CURRENCY_CODE_G1, int dewifVersion = DEWIF_VERSION, bool testRfc = false}) String
Decrypt the given DEWIF in base64 string format and associated password. Return error if DEWIF is corrupted, or the password is not the good one. If success, return mnemonic.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
randomByte(int size) String
Return a random byte of the given size
sha256(List<int> data) Uint8List
toString() String
A string representation of this object.
inherited
verifyDewif(String dewif, {int dewifCurrencyCode = DEWIF_CURRENCY_CODE_G1, int dewifVersion = DEWIF_VERSION}) bool
Return true if the given DEWIF base64 string is valid.

Operators

operator ==(Object other) bool
The equality operator.
inherited