From 7d3129f80b1b2bc40a77e3e610fe09a412c0e0a8 Mon Sep 17 00:00:00 2001 From: Jake Swenson Date: Fri, 24 Jul 2020 18:52:39 -0700 Subject: adding documentation --- src/cipherstring.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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: | let contents = contents.split("|").next().unwrap(); let ciphertext = base64::decode(contents) .context(crate::error::InvalidBase64)?; -- cgit v1.2.3-54-g00ecf