Files
spring-cloud-static/Edgware.SR4/multi/multi__encryption_and_decryption_3.html
2018-07-02 10:20:50 -04:00

10 lines
2.8 KiB
HTML

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>78.&nbsp;Encryption and Decryption</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="multi_spring-cloud.html" title="Spring Cloud"><link rel="up" href="multi__spring_boot_cloud_cli.html" title="Part&nbsp;X.&nbsp;Spring Boot Cloud CLI"><link rel="prev" href="multi__writing_groovy_scripts_and_running_applications.html" title="77.&nbsp;Writing Groovy Scripts and Running Applications"><link rel="next" href="multi__spring_cloud_security.html" title="Part&nbsp;XI.&nbsp;Spring Cloud Security"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">78.&nbsp;Encryption and Decryption</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi__writing_groovy_scripts_and_running_applications.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;X.&nbsp;Spring Boot Cloud CLI</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="multi__spring_cloud_security.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="_encryption_and_decryption_3" href="#_encryption_and_decryption_3"></a>78.&nbsp;Encryption and Decryption</h2></div></div></div><p>The Spring Cloud CLI comes with an "encrypt" and a "decrypt"
command. Both accept arguments in the same form with a key specified
as a mandatory "--key", e.g.</p><pre class="screen">$ spring encrypt mysecret --key foo
682bc583f4641835fa2db009355293665d2647dade3375c0ee201de2a49f7bda
$ spring decrypt --key foo 682bc583f4641835fa2db009355293665d2647dade3375c0ee201de2a49f7bda
mysecret</pre><p>To use a key in a file (e.g. an RSA public key for encyption) prepend
the key value with "@" and provide the file path, e.g.</p><pre class="screen">$ spring encrypt mysecret --key @${HOME}/.ssh/id_rsa.pub
AQAjPgt3eFZQXwt8tsHAVv/QHiY5sI2dRcR+...</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi__writing_groovy_scripts_and_running_applications.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="multi__spring_boot_cloud_cli.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="multi__spring_cloud_security.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">77.&nbsp;Writing Groovy Scripts and Running Applications&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="multi_spring-cloud.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Part&nbsp;XI.&nbsp;Spring Cloud Security</td></tr></table></div></body></html>