We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4adadda commit c6088f9Copy full SHA for c6088f9
src/models/otp.ts
@@ -88,9 +88,21 @@ export class OTPEntry implements OTPEntryInterface {
88
hash: string;
89
index: number;
90
},
91
- encryption?: EncryptionInterface
+ encryption?: EncryptionInterface | Map<string, EncryptionInterface>
92
) {
93
- this.encryption = encryption;
+ if (encryption instanceof Map) {
94
+ for (const key in encryption) {
95
+ if (
96
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
97
+ key
98
+ )
99
+ ) {
100
+ this.encryption = encryption.get(key);
101
+ }
102
103
+ } else {
104
+ this.encryption = encryption;
105
106
this.index = entry.index;
107
108
if ("keyId" in entry) {
0 commit comments