encryption_attribute.dart 340 B

12345678910111213141516
  1. import 'dart:typed_data';
  2. import 'package:flutter_sodium/flutter_sodium.dart';
  3. class EncryptionAttribute {
  4. String base64;
  5. Uint8List bytes;
  6. EncryptionAttribute({this.base64, this.bytes}) {
  7. if (base64 != null) {
  8. this.bytes = Sodium.base642bin(base64);
  9. } else {
  10. this.base64 = Sodium.bin2base64(bytes);
  11. }
  12. }
  13. }