<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Decrypt and Encrypt a CHAR Field in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561703#M1659165</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When we had a similar requirement for encrypting salary field what we did was creating a key table(db) with structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZCHAR type char.&lt;/P&gt;&lt;P&gt;ZKEY TYPE char(5).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The entries were on lines of &lt;/P&gt;&lt;P&gt;1    @#$fd&lt;/P&gt;&lt;P&gt;2    ^%#NF&lt;/P&gt;&lt;P&gt;....and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then when we encrypted  by reading each and every char and translating to key and appending to string...&lt;/P&gt;&lt;P&gt;EX: 21 -&amp;gt; ^%#NF@#$fd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and similarly for decrypting. This allowed us to change keys monthly to prevent anyone from being smart and guessing at the salaries too...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Feb 2012 17:13:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-02-08T17:13:15Z</dc:date>
    <item>
      <title>Decrypt and Encrypt a CHAR Field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561702#M1659164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my issue is that I want to encrypt a Char field with length 12, which is written in a table. It should be possible if necessary to decrypt the char field after encryption. Do you have any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you already&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 14:45:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561702#M1659164</guid>
      <dc:creator>martin_stampfl3</dc:creator>
      <dc:date>2012-02-08T14:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Decrypt and Encrypt a CHAR Field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561703#M1659165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When we had a similar requirement for encrypting salary field what we did was creating a key table(db) with structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZCHAR type char.&lt;/P&gt;&lt;P&gt;ZKEY TYPE char(5).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The entries were on lines of &lt;/P&gt;&lt;P&gt;1    @#$fd&lt;/P&gt;&lt;P&gt;2    ^%#NF&lt;/P&gt;&lt;P&gt;....and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then when we encrypted  by reading each and every char and translating to key and appending to string...&lt;/P&gt;&lt;P&gt;EX: 21 -&amp;gt; ^%#NF@#$fd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and similarly for decrypting. This allowed us to change keys monthly to prevent anyone from being smart and guessing at the salaries too...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 17:13:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561703#M1659165</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-08T17:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Decrypt and Encrypt a CHAR Field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561704#M1659166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look [here|http://www.sap-img.com/abap/function-module-for-encryption-and-decryption.htm].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What Ncvajja suggested is a valid approach but... the method used is easily guessed by accessing that table (SAP security should be involved).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do a search for the common encryption algorithms. They shouldn't be hard to implement in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andres.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2012 04:12:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561704#M1659166</guid>
      <dc:creator>andrs_sarcevic</dc:creator>
      <dc:date>2012-02-09T04:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Decrypt and Encrypt a CHAR Field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561705#M1659167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this code &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data enpwd(32) type c.
parameter pwd like enpwd .

******** Encrypting *******************
CALL FUNCTION 'FIEB_PASSWORD_ENCRYPT'
EXPORTING
IM_DECRYPTED_PASSWORD = pwd
IMPORTING
EX_ENCRYPTED_PASSWORD = enpwd
.
******** Decrypting *******************
CALL FUNCTION 'FIEB_PASSWORD_DECRYPT'
EXPORTING
IM_ENCRYPTED_PASSWORD = enpwd
IMPORTING
EX_DECRYPTED_PASSWORD = pwd
.

********* Output **********************
write:/ 'Encrypt data=', enpwd,
/ 'Decrypt data=', pwd. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also try this forum links &lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.sdn.sap.com/thread.jspa?messageID=5077062#5077062" target="test_blank"&gt;http://forums.sdn.sap.com/thread.jspa?messageID=5077062#5077062&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/thread.jspa?threadID=1196646&amp;amp;tstart=0" target="test_blank"&gt;https://forums.sdn.sap.com/thread.jspa?threadID=1196646&amp;amp;tstart=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards .&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2012 05:09:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561705#M1659167</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-09T05:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Decrypt and Encrypt a CHAR Field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561706#M1659168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a good blog related to this topic [Encryption &amp;amp; Decryption of data using ABAP|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5026]. The class cl_hard_wired_encryptor is used for this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2012 05:39:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561706#M1659168</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2012-02-09T05:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Decrypt and Encrypt a CHAR Field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561707#M1659169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Keshav, this blog helped me to solve my problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 08:22:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561707#M1659169</guid>
      <dc:creator>martin_stampfl3</dc:creator>
      <dc:date>2012-02-21T08:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Decrypt and Encrypt a CHAR Field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561708#M1659170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Martin, keep in mind that blog does not describe a powerful encryption method like [AES|http://en.wikipedia.org/wiki/Advanced_Encryption_Standard] or [Blowfish|http://en.wikipedia.org/wiki/Blowfish_(cipher)], but common [BASE64 Encoding|http://en.wikipedia.org/wiki/Base64]. Take a look at the comments on the blog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andres.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 02:22:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decrypt-and-encrypt-a-char-field/m-p/8561708#M1659170</guid>
      <dc:creator>andrs_sarcevic</dc:creator>
      <dc:date>2012-02-27T02:22:35Z</dc:date>
    </item>
  </channel>
</rss>

