diff options
author | Jake Swenson <jake@jakeswenson.com> | 2020-07-24 18:52:39 -0700 |
---|---|---|
committer | Jake Swenson <jake@jakeswenson.com> | 2020-07-24 18:52:39 -0700 |
commit | 7d3129f80b1b2bc40a77e3e610fe09a412c0e0a8 (patch) | |
tree | e8fa66f65b6c7b59c816c0e9e65b54a13bfbf126 /src | |
parent | 0f2d4661bc4a0cdb0be9ba17449249f910c20229 (diff) | |
download | rbw-7d3129f80b1b2bc40a77e3e610fe09a412c0e0a8.tar.gz rbw-7d3129f80b1b2bc40a77e3e610fe09a412c0e0a8.zip |
adding documentation
Diffstat (limited to 'src')
-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)?; |