上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 56 下一页

(好文)关于 Objective-c 和 Java 下 DES 加密保持一致的方式

摘要: 参考自:http://www.helmsmansoft.com/index.php/archives/1179PS By Yang3wei:做了一些修改,原文缺失的一些东西真是让人很蛋疼,从下午一直弄到晚上11点半,哎~谈一下需要注意的一些地方:1。CommonCrypto是苹果的sdk库,引入了 <CommonCrypto/CommonCryptor.h> 便可以使用到诸多加解密算法。我开始还以为 CommonCrypto 是一个第三方的库,结果在网上大肆搜罗相关的头文件以及实现,甚至一度弄得我崩溃(因为很难找全,可以想见,即使找到了相应的 .m 实现文件,也是其他人自己的实现而 阅读全文
posted @ 2012-05-26 23:52 yang3wei 阅读(264) 评论(0) 推荐(0) 编辑

NSData

摘要: 转载自:http://www.cnblogs.com/duchengdong/archive/2012/03/29/2422997.html简介:1. NSData 与 NSStringNSData-> NSStringNSString*aString = [[NSStringalloc]initWithData:adataencoding:NSUTF8StringEncoding];NSString->NSDataNSString*aString =@"1234abcd";NSData*aData = [aStringdataUsingEncoding:NSU 阅读全文
posted @ 2012-05-26 18:48 yang3wei 阅读(255) 评论(0) 推荐(0) 编辑

用 Java 实现的 Rc4 加密算法

摘要: 转载自:http://blog.csdn.net/a9529lty/article/details/4813393有一个项目,需要解析一个用户提供的rc4加密后的文件,特意搜索整理了一个java 版本的RC4加解密算法。public static String HloveyRC4(String aInput,String aKey) { int[] iS = new int[256]; byte[] iK = new byte[256]; for (int i=0;i<256;i++) ... 阅读全文
posted @ 2012-05-26 11:09 yang3wei 阅读(1246) 评论(0) 推荐(0) 编辑

用 Objective-C 实现的 Rc4 加密算法

摘要: 参考链接:http://www.cocoachina.com/iphonedev/toolthain/2011/1010/3340.htmlRc4.h#import <Foundation/Foundation.h> @interface Rc4 : NSObject +(NSString*)HloveyRC4:(NSString*)aInput key:(NSString*)aKey; @endRc4.mm#import "Rc4.h" @implementation Rc4 +(NSString*) HloveyRC4:(NSString*)aInput k 阅读全文
posted @ 2012-05-26 11:02 yang3wei 阅读(437) 评论(0) 推荐(0) 编辑

c++ DES加密代码

摘要: 转载自:http://blog.csdn.net/beyondlpf/article/details/7161964#ifndef __DES_H#define __DES_Hclass DES{public: // Encrypt/decrypt the data in "data", according to the "key". // Caller is responsible for confirming the buffer size of "data" // points to is 8*"blocks" 阅读全文
posted @ 2012-05-26 10:49 yang3wei 阅读(884) 评论(0) 推荐(0) 编辑

混编,还是会犯错~

摘要: 相关链接:http://www.cocoachina.com/ask/questions/show/53510/xcode%E6%B7%BB%E5%8A%A0fstream%E7%B1%BB%E5%BA%93问题:如何在xcode中引入#include,目前有个错误的提示是:"fstream"file not found.请高手赐教。答案:你是在.m文件中添加吗?如果是请改为.mm文件 阅读全文
posted @ 2012-05-26 10:35 yang3wei 阅读(107) 评论(0) 推荐(0) 编辑

How to uninstall git

摘要: 原文链接:http://code.google.com/p/git-osx-installer/wiki/UninstallUninstallFeaturedUpdatedFeb 4, 2010bytimchar...@gmail.comTo uninstall Git, run the following:rm -rf /usr/local/git rm /etc/paths.d/git rm /etc/manpaths.d/gitComment bytwi...@gmail.com,Dec 8, 2008Does this installer work for Tiger?Comment 阅读全文
posted @ 2012-05-23 18:11 yang3wei 阅读(265) 评论(0) 推荐(0) 编辑

PyGTK: GTK+ for Python

摘要: 转载自:http://www.pygtk.org/What is PyGTK?PyGTK lets you toeasily create programs with a graphical user interfaceusing the Python programming language.The underlying GTK+ library provides all kind of visual elements and utilities for it and, if needed,you can develop full featured applications for the 阅读全文
posted @ 2012-05-23 16:16 yang3wei 阅读(562) 评论(0) 推荐(0) 编辑

python 常用类库!

摘要: 转载自:http://fire01312.iteye.com/blog/703339Python学习On this page...(hide)1. 基本安装2. Python文档2.1 推荐资源站点2.2 其他参考资料2.3 代码示例3. 常用工具3.1 Python IDE3.2 内置类库使用参考3.3 常用第三方类库3.4 其他东西3.5 有意思的东西3.6 普通但没准有用的东西(Edit Section ↓)1. 基本安装http://www.python.org/官方标准Python开发包和支持环境,同时也是Python的官方网站;http://www.activestate.com. 阅读全文
posted @ 2012-05-23 15:53 yang3wei 阅读(1095) 评论(0) 推荐(0) 编辑

Python笔记——类定义

摘要: 转载自:http://blog.csdn.net/wklken/article/details/6313265Python笔记——类定义一、类定义:class <类名>:<语句>类实例化后,可以使用其属性,实际上,创建一个类之后,可以通过类名访问其属性如果直接使用类名修改其属性,那么将直接影响到已经实例化的对象类的私有属性:__private_attrs两个下划线开头,声明该属性为私有,不能在类地外部被使用或直接访问在类内部的方法中使用时self.__private_attrs类的方法在类地内部,使用def关键字可以为类定义一个方法,与一般函数定义不同,类方法必须包含参 阅读全文
posted @ 2012-05-23 15:27 yang3wei 阅读(234) 评论(0) 推荐(0) 编辑
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 56 下一页