elixir - AES Decryption with key derivation function -


i new elixir please offer me grace here. strong .net background working on porting decryption function .net elixir proof of concept.

the .net version basic , being implemented so: https://www.codeproject.com/articles/5719/simple-encrypting-and-decrypting-data-in-c

my question is, can give me guidance on if doable erlang crypto module? have played around block_decrypt functions never able correct result. thinking problem coming incorrect key , iv.

i unsure how derive byte data encrypted plain text value pass block_decrypt.

sorry spaghetti nature of question. guidance or pointing in right direction appreciated.

edit: here elixir code im using attempt decrypt:

defmodule testapp.decrypt   @iv <<30,64,180,159,172,197,92,10,197,3,39,75,53,92,93,37>>    def unpad(data)     to_remove = :binary.last(data)     :binary.part(data, 0, byte_size(data) - to_remove)   end     def decrypt(data, key)     io.puts "working decrypt #{data} using #{key}"     padded = :crypto.block_decrypt(:aes_cbc256, key, @iv, :base64.decode(data))     unpad(padded)   end end 

hash base64encoded: r2nsggt78u0f2oardo5u7xxdwaneejzumvuyloyo9q0=

i have 32 byte key im trying pass in getting error: erlang error: :notsup

the crypto library points error fact dirty scheduler wasnt enabled on erlang build, don't know if im going in right direction before that.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -