B4J Question Encryption library is not showing in B4J

Discussion in 'B4J Questions' started by Alexander Stolte, Mar 17, 2019.

  1. Alexander Stolte

    Alexander Stolte Well-Known Member Licensed User

    Hey,

    since i update B4J to the newest version, the Encryption library is not in the library tab.

    Does anyone else have the problem?
    I need the lib. for this code:
    Code:
    Public Sub HMACSHA256(key As String, input As String, key_is_hex_string As Boolean) As String

        
    Private wrk_mac As Mac
        
    Private wrk_key As KeyGenerator
        
    Private wrk_bc As ByteConverter
        
    Private wrk_byte() As Byte
        
        wrk_key.Initialize(
    "HMACSHA256")
        
    If key_is_hex_string Then
            wrk_key.KeyFromBytes(wrk_bc.HexToBytes(key))
        
    Else
            wrk_key.KeyFromBytes(key.GetBytes(
    "UTF8"))
        
    End If
        wrk_mac.Initialise(
    "HMACSHA256", wrk_key.Key)
        wrk_mac.Update(input.GetBytes(
    "UTF8"))
        wrk_byte = wrk_mac.Sign
        
        
    Return wrk_bc.HexFromBytes(wrk_byte).ToLowerCase
        
    End Sub
    Greetings
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Sounds like the additional libraries folder path is not configured properly.
     
  3. Alexander Stolte

    Alexander Stolte Well-Known Member Licensed User

    hmm, your'e right, but if i try to change it over Tools -> Configure Paths and change it to my B4J Additional Lib. Folder and press ok + ok on the dialog and reopen it, the old path is still in there.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    What is the folder path?
     
  5. Alexander Stolte

    Alexander Stolte Well-Known Member Licensed User

    The old path is the folder before the B4J add folder

    And the New folder path is then in the add folder
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Not sure that I understand. Make sure to update it when there is only a single instance of the IDE open. Can you post the new and old paths?
     
  7. Alexander Stolte

    Alexander Stolte Well-Known Member Licensed User

    Is the only open IDE

    current path: C:\Users\XXXX\OneDrive\B4X Libs

    new path: C:\Users\XXXX\OneDrive\B4X Libs\Add B4J
     
  8. DonManfred

    DonManfred Expert Licensed User

    make sure you only have ONE instance of b4j open.

    - Close ALL instances.
    - Start one B4J instance and change the path
    - Close B4J

    Is the path correct after you restart it now?
     
  9. Alexander Stolte

    Alexander Stolte Well-Known Member Licensed User

    No
     
  10. OliverA

    OliverA Well-Known Member Licensed User

  11. Erel

    Erel Administrator Staff Member Licensed User

    Alexander Stolte likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice