diff options
-rw-r--r-- | src/cipherstring.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cipherstring.rs b/src/cipherstring.rs index 151dea5..7f9ce31 100644 --- a/src/cipherstring.rs +++ b/src/cipherstring.rs @@ -67,6 +67,9 @@ impl CipherString { }) } 4 | 6 => { + // the only difference between 4 and 6 is the HMAC256 signature appended at the end + // https://github.com/bitwarden/jslib/blob/785b681f61f81690de6df55159ab07ae710bcfad/src/enums/encryptionType.ts#L8 + // format is: <cipher_text_b64>|<hmac_sig> let contents = contents.split("|").next().unwrap(); let ciphertext = base64::decode(contents) .context(crate::error::InvalidBase64)?; |