Add decryption of credential encrypted fields; refactored config;

add app icon
This commit is contained in:
mitchell 2019-07-08 22:03:44 -04:00
parent 910bdeae12
commit 27215e6596
60 changed files with 370 additions and 151 deletions

View file

@ -4,25 +4,32 @@
///
// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name
import 'dart:core' as $core show bool, Deprecated, double, int, List, Map, override, pragma, String;
import 'dart:core' as $core
show bool, Deprecated, double, int, List, Map, override, pragma, String;
import 'package:fixnum/fixnum.dart';
import 'package:protobuf/protobuf.dart' as $pb;
import 'dart:core' as $core show DateTime, Duration;
class Timestamp extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo('Timestamp', package: const $pb.PackageName('google.protobuf'))
static final $pb.BuilderInfo _i = $pb.BuilderInfo('Timestamp',
package: const $pb.PackageName('google.protobuf'))
..aInt64(1, 'seconds')
..a<$core.int>(2, 'nanos', $pb.PbFieldType.O3)
..hasRequiredFields = false
;
..hasRequiredFields = false;
Timestamp._() : super();
factory Timestamp() => create();
factory Timestamp.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory Timestamp.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
factory Timestamp.fromBuffer($core.List<$core.int> i,
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(i, r);
factory Timestamp.fromJson($core.String i,
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(i, r);
Timestamp clone() => Timestamp()..mergeFromMessage(this);
Timestamp copyWith(void Function(Timestamp) updates) => super.copyWith((message) => updates(message as Timestamp));
Timestamp copyWith(void Function(Timestamp) updates) =>
super.copyWith((message) => updates(message as Timestamp));
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static Timestamp create() => Timestamp._();
@ -32,30 +39,36 @@ class Timestamp extends $pb.GeneratedMessage {
static Timestamp _defaultInstance;
Int64 get seconds => $_getI64(0);
set seconds(Int64 v) { $_setInt64(0, v); }
set seconds(Int64 v) {
$_setInt64(0, v);
}
$core.bool hasSeconds() => $_has(0);
void clearSeconds() => clearField(1);
$core.int get nanos => $_get(1, 0);
set nanos($core.int v) { $_setSignedInt32(1, v); }
set nanos($core.int v) {
$_setSignedInt32(1, v);
}
$core.bool hasNanos() => $_has(1);
void clearNanos() => clearField(2);
/// Converts an instance to [DateTime].
///
/// The result is in UTC time zone and has microsecond precision, as
/// [DateTime] does not support nanosecond precision.
$core.DateTime toDateTime() => $core.DateTime.fromMicrosecondsSinceEpoch(
seconds.toInt() * $core.Duration.microsecondsPerSecond + nanos ~/ 1000,
isUtc: true);
/// Creates a new instance from [dateTime].
///
/// Time zone information will not be preserved.
static Timestamp fromDateTime($core.DateTime dateTime) {
$core.int micros = dateTime.microsecondsSinceEpoch;
return Timestamp()
..seconds = Int64(micros ~/ $core.Duration.microsecondsPerSecond)
..nanos = (micros % $core.Duration.microsecondsPerSecond).toInt() * 1000;
}
/// Converts an instance to [DateTime].
///
/// The result is in UTC time zone and has microsecond precision, as
/// [DateTime] does not support nanosecond precision.
$core.DateTime toDateTime() => $core.DateTime.fromMicrosecondsSinceEpoch(
seconds.toInt() * $core.Duration.microsecondsPerSecond + nanos ~/ 1000,
isUtc: true);
/// Creates a new instance from [dateTime].
///
/// Time zone information will not be preserved.
static Timestamp fromDateTime($core.DateTime dateTime) {
$core.int micros = dateTime.microsecondsSinceEpoch;
return Timestamp()
..seconds = Int64(micros ~/ $core.Duration.microsecondsPerSecond)
..nanos = (micros % $core.Duration.microsecondsPerSecond).toInt() * 1000;
}
}

View file

@ -11,4 +11,3 @@ const Timestamp$json = const {
const {'1': 'nanos', '3': 2, '4': 1, '5': 5, '10': 'nanos'},
],
};

View file

@ -29,7 +29,14 @@ const UpdateRequest$json = const {
'1': 'UpdateRequest',
'2': const [
const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},
const {'1': 'credential', '3': 2, '4': 1, '5': 11, '6': '.selfpass.credentials.CredentialRequest', '10': 'credential'},
const {
'1': 'credential',
'3': 2,
'4': 1,
'5': 11,
'6': '.selfpass.credentials.CredentialRequest',
'10': 'credential'
},
],
};
@ -48,8 +55,22 @@ const Metadata$json = const {
'1': 'Metadata',
'2': const [
const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},
const {'1': 'created_at', '3': 2, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'},
const {'1': 'updated_at', '3': 3, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'},
const {
'1': 'created_at',
'3': 2,
'4': 1,
'5': 11,
'6': '.google.protobuf.Timestamp',
'10': 'createdAt'
},
const {
'1': 'updated_at',
'3': 3,
'4': 1,
'5': 11,
'6': '.google.protobuf.Timestamp',
'10': 'updatedAt'
},
const {'1': 'primary', '3': 4, '4': 1, '5': 9, '10': 'primary'},
const {'1': 'source_host', '3': 5, '4': 1, '5': 9, '10': 'sourceHost'},
const {'1': 'login_url', '3': 6, '4': 1, '5': 9, '10': 'loginUrl'},
@ -61,8 +82,22 @@ const Credential$json = const {
'1': 'Credential',
'2': const [
const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},
const {'1': 'created_at', '3': 2, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'createdAt'},
const {'1': 'updated_at', '3': 3, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'updatedAt'},
const {
'1': 'created_at',
'3': 2,
'4': 1,
'5': 11,
'6': '.google.protobuf.Timestamp',
'10': 'createdAt'
},
const {
'1': 'updated_at',
'3': 3,
'4': 1,
'5': 11,
'6': '.google.protobuf.Timestamp',
'10': 'updatedAt'
},
const {'1': 'primary', '3': 4, '4': 1, '5': 9, '10': 'primary'},
const {'1': 'username', '3': 5, '4': 1, '5': 9, '10': 'username'},
const {'1': 'email', '3': 6, '4': 1, '5': 9, '10': 'email'},
@ -87,4 +122,3 @@ const CredentialRequest$json = const {
const {'1': 'otp_secret', '3': 8, '4': 1, '5': 9, '10': 'otpSecret'},
],
};