c# - Base 64 encoding in wp7? -


i have string encode in base64. final encoding saved in string.

in ios :

- (nsstring *)encodecredentials {     //string encoded     nsstring *deviceuuid = "34543647yrgsav635chbvcew4f56v"     nsdata *plaintextdata = [deviceuuid  datausingencoding:nsutf8stringencoding];     nsstring *base64string = [plaintextdata base64encodedstring];     //i return encoded string     return base64string; } 

how in wp7 ?

for encoding:

public string encode(string str) {    return convert.tobase64string(system.text.encoding.utf8.getbytes(str)); } 

for decoding:

public string decode(string str) {    return system.text.encoding.utf8.getstring(convert.frombase64string(str)); } 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -