View PlGroup Encoding / Decoding
ID | 34 |
---|---|
Text | Encoding / Decoding |
Title | Not set |
PlItems
- myfile = 'myDoc.pdf' ReturnValue = open(myfile).read().encode("base64") # in ReturnValue ist nun der Base64-String
- myfile = "myPDF.pdf"; string ReturnValue = ""; if (System.IO.File.Exists(myfile)) { using (FileStream BinaryFile = new FileStream(myfile, FileMode.Open)) { BinaryReader BinRead = new BinaryReader(BinaryFile); byte[] BinBytes = BinRead.ReadBytes(Convert.ToInt32(BinaryFile.Length)); ReturnValue = Convert.ToBase64String(BinBytes); BinaryFile.Close(); } }
- # https://docs.python.org/2/library/hashlib.html import hashlib a = "hello world" b = 0.1 md5str = hashlib.md5(str(b) + a).hexdigest()
- SELECT [CHECKSUM_1] = CHECKSUM(Column1, Column2) FROM TableA