Skip to content

Commit

Permalink
rename file name and change line length for format
Browse files Browse the repository at this point in the history
  • Loading branch information
dangfan committed Jan 15, 2024
1 parent a0b99e8 commit b41d90d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
sdk: ${{ matrix.sdk }}
- run: dart pub get
- run: dart format --output=none --set-exit-if-changed .
- run: dart format --line-length=120 --output=none --set-exit-if-changed .
- run: dart analyze
- run: dart test
# - name: Run example code
Expand Down
4 changes: 1 addition & 3 deletions lib/src/ctap2/base.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:cbor/cbor.dart' as cb;
import 'package:cbor/simple.dart';

import 'package:fido2/src/cose.dart';

enum Ctap2Commands {
Expand Down Expand Up @@ -186,8 +185,7 @@ class Ctap2 {
var map = cbor.decode(data) as Map;
var keyAgreementMap = (map[1] as Map?)?.cast<int, dynamic>();
return ClientPinResponse(
keyAgreement:
keyAgreementMap != null ? CoseKey.parse(keyAgreementMap) : null,
keyAgreement: keyAgreementMap != null ? CoseKey.parse(keyAgreementMap) : null,
pinUvAuthToken: (map[2] as List?)?.cast<int>(),
pinRetries: map[3] as int?,
powerCycleState: map[4] as bool?,
Expand Down
3 changes: 2 additions & 1 deletion lib/src/ctap2/pin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ class PinProtocolV1 extends PinProtocol {
@override
Future<List<int>> decrypt(List<int> key, List<int> ciphertext) async {
final algorithm = AesCbc.with128bits(macAlgorithm: MacAlgorithm.empty, paddingAlgorithm: PaddingAlgorithm.zero);
return await algorithm.decrypt(SecretBox(ciphertext, nonce: List.filled(16, 0), mac: Mac.empty), secretKey: SecretKeyData(key));
return await algorithm.decrypt(SecretBox(ciphertext, nonce: List.filled(16, 0), mac: Mac.empty),
secretKey: SecretKeyData(key));
}

@override
Expand Down
File renamed without changes.

0 comments on commit b41d90d

Please sign in to comment.