Remove plain OpenStack pwd from Heat
[demo.git] / heat / ONAP / openstack_encrypted_key.sh
1 #!/bin/bash
2
3 usage () {
4   echo "Usage:"
5   echo "   ./$(basename $0) your_openstack_password"
6   exit 1
7 }
8
9 if [ "$#" -ne 1 ]; then
10   echo "Wrong number of input parameters"
11   usage
12 fi
13
14 SO_ENCRYPTION_KEY=aa3871669d893c7fb8abbcda31b88b4f
15 OPENSTACK_API_KEY=$1
16
17 echo -n "$OPENSTACK_API_KEY" | openssl aes-128-ecb -e -K $SO_ENCRYPTION_KEY -nosalt | xxd -c 256 -p