Created
February 19, 2019 22:06
-
-
Save kjetilho/ff73705786804563a7c64d132ee5bdac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
declare -A pvalue | |
parse_plist() { | |
declare -a pl=$1 | |
pvalue=() | |
local i=0 | |
while [[ i -lt ${#pl[@]} ]] | |
do | |
pvalue[${pl[ i ]}]=${pl[ i+1 ]} | |
i=$(( i + 2 )) | |
done | |
} | |
parse_plist '(:iv "1m687rP6n8Ch7VfNu0joEw==" :length 2 :message "iFfFOl/sMxLb6ExwOuxFvsnvU1L1RNp4uarw1PHSR6M=")' | |
echo "IV is ${pvalue[:iv]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment