<?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: Password encryption and decryption in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253629#M1213663</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search the function group 'FIEB_PASSWORD'.&lt;/P&gt;&lt;P&gt;There u can find various function modules to play around.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for more details check this link &lt;/P&gt;&lt;P&gt;[http://sap.ittoolbox.com/groups/technical-functional/sap-dev/password-encryption-741992]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope the content helps u..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Feb 2009 08:02:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-20T08:02:22Z</dc:date>
    <item>
      <title>Password encryption and decryption</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253626#M1213660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am designing a new transaction for which the initial screen is log on page. In this screen user enters his user id and password and starts his normal process. Here i  want to store the user ids and passwords in a ztable and when user tries to access this transaction first i want verify his credentials. So here i want to encrypt the passwords and will store in z table and for verification i want to decrypt it to check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one please tell me is there any Fms to achieve the above requirement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,CS Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2009 07:55:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253626#M1213660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-20T07:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Password encryption and decryption</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253627#M1213661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try these functions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FC_SET_ENCRYPT_SETID &lt;/P&gt;&lt;P&gt;FIEB_PASSWORD_ENCRYPT &lt;/P&gt;&lt;P&gt;G_SET_ENCRYPT_SETID &lt;/P&gt;&lt;P&gt;K_ENCRYPT_RESOURCE &lt;/P&gt;&lt;P&gt;OFX_ALS_PASSWORD_ENCRYPT &lt;/P&gt;&lt;P&gt;OS390_ENCRYPT &lt;/P&gt;&lt;P&gt;SSFH_F4_ENCRALG &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mon Magllanes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2009 07:59:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253627#M1213661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-20T07:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Password encryption and decryption</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253628#M1213662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use below FM's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Encryption:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FIEB_PASSWORD_ENCRYPT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;IM_DECRYPTED_PASSWORD = pwd1 &lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;EX_ENCRYPTED_PASSWORD = pwd2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Decryption: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FIEB_PASSWORD_DECRYPT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;IM_ENCRYPTED_PASSWORD = pwd2 &lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;EX_DECRYPTED_PASSWORD = pwd3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Might help u&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sap Fan on Feb 20, 2009 9:00 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2009 08:00:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253628#M1213662</guid>
      <dc:creator>awin_prabhu</dc:creator>
      <dc:date>2009-02-20T08:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Password encryption and decryption</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253629#M1213663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search the function group 'FIEB_PASSWORD'.&lt;/P&gt;&lt;P&gt;There u can find various function modules to play around.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for more details check this link &lt;/P&gt;&lt;P&gt;[http://sap.ittoolbox.com/groups/technical-functional/sap-dev/password-encryption-741992]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope the content helps u..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2009 08:02:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253629#M1213663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-20T08:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: Password encryption and decryption</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253630#M1213664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a similar requirement, I have used this FM this resolved my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  IF NOT cnt &amp;gt; 3.
          CLEAR: pswrd,password.
          pswrd  = zoperator-paswrd.

          CALL FUNCTION 'DB_CRYPTO_PASSWORD'
            EXPORTING
              clear_text_password          = pswrd
            IMPORTING
              encoded_password             = password
            EXCEPTIONS
              crypt_output_buffer_to_small = 1
              crypt_internal_error         = 2
              crypt_truncation_error       = 3
              crypt_conversion_error       = 4
              internal_error               = 5
              OTHERS                       = 6.
          IF sy-subrc &amp;lt;&amp;gt; 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.

 LOOP AT it_opt.
            IF it_opt-paswrd  CO password.
*              CALL SCREEN 2000.
              CALL SCREEN 4000.


            ELSE.
              CLEAR: zwb_operator-opname,zwb_operator-paswrd,password,pswrd.
              MESSAGE e000(zwb) WITH 'Please enter the Valid Password'.

              .
              LEAVE TO SCREEN 1000.
              cnt =  cnt + 1.
              IF cnt &amp;gt; 3.
                LEAVE TO SCREEN 0.
              ENDIF.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also use same data element which they have used in this FM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2009 08:07:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253630#M1213664</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-20T08:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Password encryption and decryption</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253631#M1213665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I have used 'FIEB_PASSWORD_ENCRYPT' and 'FIEB_PASSWORD_DECRYPT' function modules for encryption and decryption. But am not getting the decrypted Password from decrypt FM. It is showing blank value..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one please suggest some other FM?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2009 09:33:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253631#M1213665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-23T09:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Password encryption and decryption</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253632#M1213666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I've also tried function group &lt;STRONG&gt;FIEB_PASSWORD&lt;/STRONG&gt;, which was &lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;not working&lt;/STRONG&gt;&lt;/SPAN&gt; like I expected. I checked group and find out possible problem. At least with version from few systems I checked. I have read it can work on some older releases. I found out that encrypt/decrypt uses form from include &lt;STRONG&gt;"LFIEB_PASSWORDF01"&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;"character_search"&lt;/STRONG&gt;. This form should return position of character from string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Original source code:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM character_search USING    im_string
                               im_character
                      CHANGING ch_pos             type i.

  data:
    l_index            type i,
    l_length           type i.

*  describe field im_string length l_length.

  ch_pos     = -1.
  l_index    =  0.
  do l_length times.
    if im_string+l_index(1) = im_character.
      ch_pos = l_index.
      exit.
    endif.
    l_index = l_index + 1.
  enddo.

ENDFORM.                    " character_search
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is variable &lt;STRONG&gt;"l_length"&lt;/STRONG&gt; in do enddo loop. It's &lt;STRONG&gt;not set&lt;/STRONG&gt; to any value (commented). It's always &lt;STRONG&gt;"0"&lt;/STRONG&gt;.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;l_length = 0 (always)&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So it won't ever return correct position of character.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;ch_pos = -1 (always)&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So there's need to correct this. You can copy whole group and make &lt;STRONG&gt;"Z/Y"&lt;/STRONG&gt; one. I used &lt;STRONG&gt;implicit enhancement&lt;/STRONG&gt;. We cannot simply un-comment line. So we need to correct code and exit processing of standard code with adding this code to enhancement at begin of form:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ch_pos = -1.
find im_character in im_string match offset ch_pos.
exit. " =&amp;gt; don't continue processing of standard code
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Corrected source code:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM character_search USING    im_string
                               im_character
                      CHANGING ch_pos             type i.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1 ) Form CHARACTER_SEARCH
*$*$-Start: (1 )--------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZFBZI_FIEB_PASSWORD.    "active version
*
    ch_pos = -1.
    find im_character in im_string match offset ch_pos.

    exit. " =&amp;gt; don't continue processing of standard code

ENDENHANCEMENT.
*$*$-End:   (1 )--------------------------------------------------------------------------------$*$*

  data:
    l_index            type i,
    l_length           type i.

*  describe field im_string length l_length.

  ch_pos     = -1.
  l_index    =  0.
  do l_length times.
    if im_string+l_index(1) = im_character.
      ch_pos = l_index.
      exit.
    endif.
    l_index = l_index + 1.
  enddo.

ENDFORM.                    " character_search
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not universal solution, as far as SAP can decide to correct this but still we'll use our code. So we can place enhancement in the end of form and add condition for our code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
check ( ch_pos = -1 ). " &amp;lt;= run only if character is not found
find im_character in im_string match offset ch_pos.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Decision is up to you. Both solutions will work &lt;SPAN __default_attr="green" __jive_macro_name="color"&gt;&lt;STRONG&gt;OK&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Just remember, that this FM(s) are &lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;not very secure&lt;/STRONG&gt;&lt;/SPAN&gt; as you can decrypt passwords simply by finding them in table "FIEB_PASSWORD" and using FM "FIEB_PASSWORD_GET" to get all passwords by ID or using SE37/debug, .... And while testing don't forget to set checkbox &lt;STRONG&gt;"Uppercase/Lowercase"&lt;/STRONG&gt; &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 22:23:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/password-encryption-and-decryption/m-p/5253632#M1213666</guid>
      <dc:creator>tomas_chrastina</dc:creator>
      <dc:date>2012-02-23T22:23:31Z</dc:date>
    </item>
  </channel>
</rss>

