base64

图解TCPIP-OSI7层网络模型

假装没事ソ 提交于 2019-12-23 02:13:35
OSI(Open System Interconnect) 应用层: HTTP 表示层: 转换应用处理信息和网络传输信息. 网络传入对比特流解释不同,所以一般使用base64转码 会话层: 建立和断开通信连接 socket的listen(),accept(),connect() 传输层: TCP/UDP协议 网络层: IP地址协议 数据链路层: 将0/1序列划分为有意义的数据帧,传送 物理层 1.计算机以二进制0/1表示信息 2.传输媒介用电压的高低/光闪灭/电波的强弱表示 3.物理层就是将二者进行转换 参考: <图解TCP IP> 来源: CSDN 作者: Claroja 链接: https://blog.csdn.net/claroja/article/details/103508488

convert base64 to bitmap

丶灬走出姿态 提交于 2019-12-23 01:24:21
问题 I try to convert a base64 string to bitmap but then i get a black image.. This is the script that i use to decode: function Base64ToBitmap(const S: string): TBitmap; var SS: TStringStream; V: string; begin V := Decode(S); SS := TStringStream.Create(V); try Result := TBitmap.Create; Result.LoadFromStream(SS); finally SS.Free; end; end; This is the decode script: function Decode(const Input: AnsiString): string; var bytes: TBytes; utf8: UTF8String; begin bytes := EncdDecd.DecodeBase64(Input);

浅谈DES加密算法

折月煮酒 提交于 2019-12-23 00:37:43
一、DES加密算法介绍 1、要求密钥必须是8个字节,即64bit长度 2、因为密钥是byte[8] , 代表字符串也可以是非可见的字节,可以与Base64编码算法一起使用 3、加密、解密都需要通过字节数组作为数据和密钥进行处理 二、对称加密 DES加密算法属于对称加密。 即利用指定的密钥,按照密码的长度截取数据,分成数据块,和密钥进行复杂的移位、算数运算或者数据处理等操作,形成只有特定的密码才能够解开的数据。 加密与解密用的是同一个密钥 三、相关类 1、Cipher: Java/Android要使用任何加密,都需要使用Cipher这个类 使用Cipher进行加密,解密处理,需要创建实例对象并初始化。采用工厂模式创建对象 Cipher cipher = Cipher.getInstance("算法名称"); cipher.init(加密/解密模式,Key秒); 2、Key: Key类是Java加密系统所有密码的父类 3、SecretKeyFactory: 对于DES加密解密,使用SecretKeyFactory生成,生成时需指定DESKeySpec 四、加密代码步骤 1. 获取Cipher对象,设置加密算法 Cipher cipher = Cipher.getInstance("DES"); 2、准备Key对象   2.1 DES加密算法使用DESKeySpec类

移动端测试

余生长醉 提交于 2019-12-23 00:09:01
移动数据平台: TalkingData 移动观象平台 App 功能测试 业务逻辑正确性测试:一句产品文档设计测试用例,加上隐性需求用例 兼容性测试: 系统版本: android :4.4 5.0 6.0 7.0 iOS:原生系统:5.0 屏幕分辨率: 720 * 1280, 1920*1080 图片(根据分辨率做一些图片) 网络状态: 2g,3g,4g,5g wifi 异常测试: 热启动应用:应用由后台转换为前台的过程 考虑:1.仍然展示退到后台时的页面 2.希望初始化首页 网络切换和终端回复 1.网络切换:wifi->2g , 4g->3g 应用正常可用状态 2.终端恢复:4g->断网->4g,(下载2M 应用,1M断网.恢复网络(断点续传)) 电话和信息中断恢复 电话:看视频->电话接10分钟->返回视频 app 信息:玩游戏->通知栏一个消息->不影响游戏体验 升级安装卸载测试: 升级: 临近版本升级(1.0>1.1) 跨版本升级(1.0->1.7) 保证升级后App可用状态 安装测试: 首次安装 卸载后安装 覆盖安装 保证app安装后可用,安装文件齐全​ 卸载测试: 正常卸载 卸载后安装再卸载 保证卸载后,需要清理的文件全部清空,需要保留的文件存在 健壮性测试: 手机资源消耗:cpu,内存,耗电测试 流量消耗:数据流量,加载图片瞬间小号20M 图片压缩,数据压缩 崩溃恢复:

PHP Byte Array to Base64 (Byte Array From Mssql)

谁说胖子不能爱 提交于 2019-12-22 18:15:17
问题 I use Mssql and images on table like "0xFFD8FFE000104A46494...." . I think it is byte array . And I wanna change it to image with PHP. I try this; <?php $resim="0xFFD8FFE000104A46494...."; ?> <img src="data:image/jpeg;base64,<?php echo base64_encode($resim);?>" /> But image doesn't show. Code demo: (http://sandbox.onlinephpfunctions.com/code/61b8f073a70100338681e8ab37b0a75c930eca6e) 回答1: You need to convert the hexadecimal string from SQL Server to base64. Try this, it should work : <?php

Emotion API Project Oxford base64 image

无人久伴 提交于 2019-12-22 17:29:09
问题 I am trying to make a call to the Emotion Api via JavaScript with in a PhoneGap app. I encoded the image into base64 and verified that the data can be decoded by one of the online tools. this is the code that i found on the web to use. var apiKey = "e371fd4333ccad2"; //(you can get a free key on site this is modified for here) //apiUrl: The base URL for the API. Find out what this is for other APIs via the API documentation var apiUrl = "https://api.projectoxford.ai/emotion/v1.0/recognize";

Conversion image links to base64 and adding them to zip file using JSZip

∥☆過路亽.° 提交于 2019-12-22 14:16:20
问题 So basically I want to add few images to zip file and be able to download it. I have two variables holding sources of images - pic1, pic2 and a global variable basePic for holding base64 string. I have a function to convert image to base64 : var pic; //http://www.somesite.com/i/picture.jpg var pic2; //http://www.somesite.com/i/picture2.jpg var basePic;// base64 string of an image function getBase64FromImageUrl(url) { var img = new Image(); img.setAttribute('crossOrigin', 'anonymous'); img

(de)compress base64 string

懵懂的女人 提交于 2019-12-22 13:52:19
问题 PHP code: $txt="John has cat and dog."; //plain text $txt=base64_encode($txt); //base64 encode $txt=gzdeflate($txt,9); //best compress $txt=base64_encode($txt); //base64 encode print_r($txt); //print it Below code return: C861zE/KdMqPjPBNjzRyM/B0dyuNcnbKTjJKLgUA I'm trying compress string in Java. // Encode a String into bytes String inputString = "John has cat and dog."; inputString=Base64.encode(inputString); byte[] input = inputString.getBytes("UTF-8"); // Compress the bytes byte[] output

Node.js - MJPEG TCP stream to base64 images

ε祈祈猫儿з 提交于 2019-12-22 12:08:07
问题 Based on paparazzo.js lib, I'm trying to get base64 images from a MJPEG stream (streamed over TCP with GStreamer) in a Node.js server, and to send them to the clients via websockets. I think I'm pretty close, but my images are corrupted. Here is the code I'm using : var boundary = "----videoboundary"; var data = ""; var tcpServer = net.createServer(function (socket) { socket.on('data', function(chunk) { var boundaryIndex = chunk.toString().indexOf(boundary); if (boundaryIndex !== -1) { // Get

谷歌浏览器书签网址保存

末鹿安然 提交于 2019-12-22 11:24:09
POJ: http://poj.org/ GZUOJ: http://210.40.17.235/ codeforces: http://codeforces.com/ 计蒜客: https://nanti.jisuanke.com/acm vjudge: https://vjudge.net/contest#category=mine&running=0&title=Gzu&owner= 洛谷: https://www.luogu.org/ PTA: https://pintia.cn/problem-sets?tab=0 杭电OJ: http://acm.hdu.edu.cn/ CODEVS: http://login.codevs.com/auth/login 代码贴: https://paste.ubuntu.com/?tdsourcetag=s_pctim_aiomsg 北大ACM题目分类: http://exp-blog.com/2018/06/28/pid-38/ POJ题目分类: https://blog.csdn.net/a1dark/article/details/11714009 cplusplus: http://www.cplusplus.com/ 下载Win10: https://www.microsoft.com/zh-cn/software