Click here to Skip to main content
15,902,114 members
Home / Discussions / C#
   

C#

 
QuestionProcess class access denied on smss Pin
stwu4-Jul-08 8:18
stwu4-Jul-08 8:18 
Questiontyped dataset schema relating to xml file Pin
steve_rm4-Jul-08 8:13
steve_rm4-Jul-08 8:13 
QuestionLine in PictureBox Pin
godspeed1234-Jul-08 7:44
godspeed1234-Jul-08 7:44 
AnswerRe: Line in PictureBox Pin
netJP12L4-Jul-08 8:35
netJP12L4-Jul-08 8:35 
AnswerRe: Line in PictureBox Pin
Christian Graus4-Jul-08 9:23
protectorChristian Graus4-Jul-08 9:23 
QuestionSpying on System.Windows.Forms.DataGridView in another app... Pin
Fuzzychaos4-Jul-08 7:28
Fuzzychaos4-Jul-08 7:28 
QuestionC# or C++/CLI? Pin
Tal Rasha's Guardianship4-Jul-08 7:27
Tal Rasha's Guardianship4-Jul-08 7:27 
AnswerRe: C# or C++/CLI? Pin
Paul Conrad4-Jul-08 7:40
professionalPaul Conrad4-Jul-08 7:40 
AnswerRe: C# or C++/CLI? Pin
BadKarma4-Jul-08 12:07
BadKarma4-Jul-08 12:07 
GeneralRe: C# or C++/CLI? Pin
Tal Rasha's Guardianship5-Jul-08 3:47
Tal Rasha's Guardianship5-Jul-08 3:47 
Questionrefresh dataset after updating Pin
jaffa4-Jul-08 6:39
jaffa4-Jul-08 6:39 
AnswerRe: refresh dataset after updating Pin
jaffa4-Jul-08 6:49
jaffa4-Jul-08 6:49 
QuestionString.fromCharCode and charCodeAt Pin
tim_gunning4-Jul-08 6:16
tim_gunning4-Jul-08 6:16 
AnswerRe: String.fromCharCode and charCodeAt Pin
tim_gunning4-Jul-08 6:42
tim_gunning4-Jul-08 6:42 
AnswerRe: String.fromCharCode and charCodeAt Pin
Guffa4-Jul-08 6:43
Guffa4-Jul-08 6:43 
GeneralRe: String.fromCharCode and charCodeAt Pin
tim_gunning4-Jul-08 9:17
tim_gunning4-Jul-08 9:17 
AnswerRe: String.fromCharCode and charCodeAt Pin
Guffa4-Jul-08 12:44
Guffa4-Jul-08 12:44 
GeneralRe: String.fromCharCode and charCodeAt [modified] Pin
tim_gunning4-Jul-08 14:27
tim_gunning4-Jul-08 14:27 
GeneralRe: String.fromCharCode and charCodeAt Pin
Guffa4-Jul-08 14:38
Guffa4-Jul-08 14:38 
GeneralRe: String.fromCharCode and charCodeAt Pin
tim_gunning4-Jul-08 14:49
tim_gunning4-Jul-08 14:49 
hi
in c# i used

Convert.ToBase64String(Encoding.ASCII.GetBytes(my_str))


and in js i used the base64 encoding i found in amongst the encryption files from http://labs.boulevart.be/index.php/2007/05/23/encryption-in-as2-and-as3/[^] which is where my problems began.... not that i'm putting down what they have there, I just couldn't get it to produce the same results from my end with the rijndael/TEa encryption, the base64 seems to be fine

tim

edit:
this is the function that encodes to base64 in js:

*/
private static var base64chars:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

/**
* Encodes a base64 string.
*/
public static function encode(src:String):String {
    var i:Number = 0;
    var output:String = new String("");
    var chr1:Number, chr2:Number, chr3:Number;
    var enc1:Number, enc2:Number, enc3:Number, enc4:Number;
    while (i < src.length) {
        chr1 = src.charCodeAt(i++);
        chr2 = src.charCodeAt(i++);
        chr3 = src.charCodeAt(i++);
        enc1 = chr1 >> 2;
        enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
        enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
        enc4 = chr3 & 63;
        if(isNaN(chr2)) enc3 = enc4 = 64;
        else if(isNaN(chr3)) enc4 = 64;
        output += base64chars.charAt(enc1)+base64chars.charAt(enc2);
        output += base64chars.charAt(enc3)+base64chars.charAt(enc4)
    }
    return output;
}

GeneralRe: String.fromCharCode and charCodeAt Pin
Guffa5-Jul-08 3:32
Guffa5-Jul-08 3:32 
GeneralRe: String.fromCharCode and charCodeAt Pin
tim_gunning6-Jul-08 2:08
tim_gunning6-Jul-08 2:08 
GeneralRe: String.fromCharCode and charCodeAt Pin
N a v a n e e t h4-Jul-08 16:45
N a v a n e e t h4-Jul-08 16:45 
GeneralRe: String.fromCharCode and charCodeAt Pin
Guffa5-Jul-08 3:18
Guffa5-Jul-08 3:18 
GeneralRe: String.fromCharCode and charCodeAt Pin
N a v a n e e t h5-Jul-08 16:33
N a v a n e e t h5-Jul-08 16:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.