Android Question RSA with b4a

Discussion in 'Android Questions' started by omidaghakhani1368, Jul 30, 2015.

  1. omidaghakhani1368

    omidaghakhani1368 Well-Known Member Licensed User

    I can encrypt data with algoritm RSA with below code
    but i cannot decrypt data
    (public and private key created with php)

    Dim su As StringUtils
    Dim data() As Byte = su.DecodeBase64(File.ReadString(File.DirAssets,"public.txt"))
    Dim p1 As KeyPairGenerator
    Dim c1 As Cipher
    Dim d1() As Byte
        d1 = c1.Encrypt(r1.StringToBytes(
    Dim res As String
        res = su.EncodeBase64(d1)
    Alexander Stolte likes this.
  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