Initial commit for AAI-UI(sparky-backend)
[aai/sparky-be.git] / src / main / scripts / encNameValue.sh
1 # The script invokes the com.amdocs.aai.audit.security.encryption.EncryptedPropValue class to generate an encrypted value
2 # e.g
3 # ./encNameValue.sh odl.auth.password admin
4 # will return:
5 # odl.auth.password.x=f1e2c25183ef4b4ff655e7cd94d0c472
6 #
7 if [ "$#" -ne 2 ]; then
8     echo "Illegal number of parameters (expected 2)"
9     echo "Usage: `basename $0` <property name> <property value>" 1>&2
10     exit 1
11 fi
12
13 # On Windows we must use a different CLASSPATH separator character
14 if [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then
15         CPSEP=\;
16 else
17         CPSEP=:
18 fi
19
20 java -cp ".${CPSEP}../extJars/*" com.att.aai.util.EncryptedPropValue -n $1 -v $2