Skip to content

Instantly share code, notes, and snippets.

@moenk
Created December 15, 2023 16:15
Show Gist options
  • Save moenk/8aeec27ab6449d77265a0c12e54bde59 to your computer and use it in GitHub Desktop.
Save moenk/8aeec27ab6449d77265a0c12e54bde59 to your computer and use it in GitHub Desktop.
UiPath vb .net encode Flickr photoid base58
Dim CHARS As String = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"
Dim CHAR_NUM As Integer = CHARS.Length
encoded = ""
dim fid as Int64 = Convert.ToInt64(photoid)
While fid >= CHAR_NUM
Dim divx As Int64
Dim modx As Int64
divx = Math.DivRem(fid, CHAR_NUM, modx)
encoded = CHARS(CInt(modx)) & encoded
fid = divx
End While
encoded = CHARS(cint(fid)) & encoded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment