anchor.diff:  
   block_size(Cipher) when Cipher == rc2_cbc; 
                           Cipher == des_cbc;
  -			Cipher == des_3ede -> 
  +			Cipher == des_ede3_cbc -> 
       8;
   block_size(Cipher) when Cipher == aes_128_cbc;
                           Cipher == aes_192_cbc;
  
positive.code: %%--------------------------------------------------------------------
  encode(Data, Password, "DES-CBC" = Cipher, KeyDevParams) ->
      {Key, IV} = password_to_key_and_iv(Password, Cipher, KeyDevParams),
      crypto:block_encrypt(des_cbc, Key, IV, pbe_pad(Data, block_size(des_cbc)));
  encode(Data, Password, "DES-EDE3-CBC" = Cipher, KeyDevParams) ->
      {Key, IV} = password_to_key_and_iv(Password, Cipher, KeyDevParams),
      <<Key1:8/binary, Key2:8/binary, Key3:8/binary>> = Key,
      crypto:block_encrypt(des3_cbc, [Key1, Key2, Key3], IV,  pbe_pad(Data, block_size(des_3ede)));
  encode(Data, Password, "RC2-CBC" = Cipher, KeyDevParams) ->
      {Key, IV} = password_to_key_and_iv(Password, Cipher, KeyDevParams),
      crypto:block_encrypt(rc2_cbc, Key, IV,  pbe_pad(Data, block_size(rc2_cbc)));
  encode(Data, Password, "AES-128-CBC" = Cipher, KeyDevParams) ->
      {Key, IV} = password_to_key_and_iv(Password, Cipher, KeyDevParams),
      crypto:block_encrypt(aes_128_cbc, Key, IV,  pbe_pad(Data, block_size(aes_128_cbc)));
  encode(Data, Password, "AES-192-CBC" = Cipher, KeyDevParams) ->
      {Key, IV} = password_to_key_and_iv(Password, Cipher, KeyDevParams),
      crypto:block_encrypt(aes_192_cbc, Key, IV,  pbe_pad(Data, block_size(aes_192_cbc)));
  encode(Data, Password, "AES-256-CBC"= Cipher, KeyDevParams) ->
      {Key, IV} = password_to_key_and_iv(Password, Cipher, KeyDevParams),
      crypto:block_encrypt(aes_256_cbc, Key, IV,  pbe_pad(Data, block_size(aes_256_cbc))).
  
  %%--------------------------------------------------------------------
  -spec decode(binary(), string(), string(), term()) -> binary().
  
negative.code: %% ?'id-hmacWithSHA1, but we need some kind of ASN1-fix for this.
  pseudo_random_function(#'PBKDF2-params_prf'{algorithm = 
  						{_,_, _,'id-hmacWithSHA1'}}) ->
      {fun hmac4/4, sha, pseudo_output_length(?'id-hmacWithSHA1')};
  pseudo_random_function(#'PBKDF2-params_prf'{algorithm = ?'id-hmacWithSHA1' = Algo}) ->
      {fun hmac4/4, sha, pseudo_output_length(Algo)};
  pseudo_random_function(#'PBKDF2-params_prf'{algorithm = ?'id-hmacWithSHA224'= Algo}) ->
      {fun hmac4/4, sha224, pseudo_output_length(Algo)};
  pseudo_random_function(#'PBKDF2-params_prf'{algorithm = ?'id-hmacWithSHA256' = Algo}) ->
      {fun hmac4/4, sha256,  pseudo_output_length(Algo)};
  pseudo_random_function(#'PBKDF2-params_prf'{algorithm = ?'id-hmacWithSHA384' = Algo}) ->
      {fun hmac4/4, sha384,  pseudo_output_length(Algo)};
  pseudo_random_function(#'PBKDF2-params_prf'{algorithm = ?'id-hmacWithSHA512' = Algo}) ->
      {fun hmac4/4, sha512,  pseudo_output_length(Algo)}.                 
  
  hmac4(SubType, Key, Data, MacLength) ->
      crypto:macN(hmac, SubType, Key, Data, MacLength).
      
  
  pseudo_output_length(?'id-hmacWithSHA1') ->
      20; %%160/8
  