anchor.diff: -﻿module ENC
  +module ENC
   
   open Bytes
   open Error
  
positive.code:             let data = cbcdec alg s.key.k iv cipher
              let d = Encode.plain ki (length cipher) data in
              let s = {s with iv = SomeIV(lastblock cipher alg)} in
              (BlockCipher(s), d)
      | BlockCipher(s), CBC_Fresh(alg) ->
          match s.iv with
          | SomeIV(_) -> unexpectedError "[DEC] Wrong combination of cipher algorithm and state"
  
negative.code:                 unexpectedError "[ENC] Length of encrypted data do not match expected length"
              else
                  let s = {s with iv = SomeIV(lastblock cipher alg) } in
                  (BlockCipher(s), cipher)
      //#end-ivStaleEnc
      | BlockCipher(s), CBC_Fresh(alg) ->
          match s.iv with
          | SomeIV(b) -> unexpectedError "[ENC] Wrong combination of cipher algorithm and state"
  