Android Question RandomAccessFile string encryption

Devv

Active Member
Licensed User
Longtime User
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim raf As RandomAccessFile
Dim test As String

   raf.Initialize(File.DirRootExternal, "test.dat", False)
   'Dim list2 As List
   test = raf.ReadEncryptedObject("some secret password", raf.CurrentPosition)
   Log(test)
   raf.Close

End Sub

the list example worked ok, what i'am doing wrong with my code ?
 

KMatle

Expert
Licensed User
Longtime User
Upvote 0

Devv

Active Member
Licensed User
Longtime User
You can only use this method with files created with RAF.WriteEncryptedObject.
what is an easy way/method to decrypt a string with b4a when that string is not ecrypted with b4a ?
 
Upvote 0