Skip to content

Instantly share code, notes, and snippets.

@haxxinen
Created February 10, 2020 21:20
Show Gist options
  • Save haxxinen/9d2d2fdcdc06fea565a56101ac5c386d to your computer and use it in GitHub Desktop.
Save haxxinen/9d2d2fdcdc06fea565a56101ac5c386d to your computer and use it in GitHub Desktop.
Jenkins credentials.xml
println(hudson.util.Secret.fromString("1234").getEncryptedValue())

Output: {AQAAABAAAAAQc//GkWTtyO8B5f1re53AX+8S0yCRKA8h7ean+y/sQig=}

println(hudson.util.Secret.decrypt('{AQAAABAAAAAQc//GkWTtyO8B5f1re53AX+8S0yCRKA8h7ean+y/sQig=}'))

Output: 1234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment