Here is the json string I am attempting to encrypt.
{
"root": [
{
"user_name": 0,
"id": 1607406053,
"status": "online"
},
{
"user_name": 0,
"id": 2112661677,
"status": "offline"
}
]
}
Here is the line i use to do it:
Sub encrypt(data As String,user_id As String) As String
'call a sub that looks up the password
Dim Password As String = reterive_password
'do the encryption using the data and the password
Return su.EncodeUrl(su.encodeBase64(Cipher.Encrypt(data.GetBytes("UTF8"), Password)), "UTF8")
End Sub
The error I get is:
Error occurred on line: 17 (Security)
java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
{
"root": [
{
"user_name": 0,
"id": 1607406053,
"status": "online"
},
{
"user_name": 0,
"id": 2112661677,
"status": "offline"
}
]
}
Here is the line i use to do it:
Sub encrypt(data As String,user_id As String) As String
'call a sub that looks up the password
Dim Password As String = reterive_password
'do the encryption using the data and the password
Return su.EncodeUrl(su.encodeBase64(Cipher.Encrypt(data.GetBytes("UTF8"), Password)), "UTF8")
End Sub
The error I get is:
Error occurred on line: 17 (Security)
java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1