Coder Social home page Coder Social logo

zengwn / devdatatool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mxabc/devdatatool

0.0 1.0 0.0 8.49 MB

编码转换、摘要(hash)、加解密(MD5、SHA、SHA3、SM3、HMAC、DES、3DES、AES、SM4)

License: MIT License

Objective-C 95.04% C 3.55% Ruby 0.39% MATLAB 1.02%

devdatatool's Introduction

DevTool

实现mac端调试工具验证结果正确性,代码兼容iOS和MacOS,其中SM3,SM4使用C语言代码,补位代码和分组模式代码自行通过objective-c代码实现,加强理解。代码基本通过category形式提供。

当前完成

  1. NSString和NSData各种编码转换(UTF-8,GBK,Latin1,unicode,shiftJI)

  2. NSData转换hexString及base64String方便调试看数据

  3. NSString与NSData之间转换

  4. base64

  5. hash(MD5,SHA1,SHA256,SHA3,SM3,HMAC)

  6. 对称加解密(DES,3DES,AES,SM4) 支持分组加密模式有: ECB、CBC、PCBC、CFB、OFB、CTR 填充方式(分组不足补位)有:PKCS7、zero、ANSIX923、ISO10126、0x80等

  7. der,cer证书文件解析

截图

HASH

image

encryption and decryption

image

cer analysis

image

cocoapods安装

包含base64,数据转换,摘要算法,对称加解密

 pod 'LBXDataHandler', '~> 1.0.3'

文件说明

常用转换
  • NSData+LBXConverter.h
  • NSString+LBXConverter.h
摘要算法
  • NSData+LBXHash.h 各种摘要算法

  • NSString+LBXFileHash.h 文件摘要

base64转换
  • NSData+LBXBase64.h base64变换

  • NSString+LBXBase64.h base64反变换

编码转换、格式转换、形式转换
  • NSData+LBXConverter.h 转换成各种形式NSString,字典等

  • NSString+LBXConverter.h 各种编码转换、NSData,NSDate等

对称加解密
  • NSData+LBXCrypt.h 对称加解密封装接口
/**
 encrypt interface

 @param op encryt or decrypt
 @param alg encryt algorithm
 @param om ECB、CBC、CFB、OFB
 @param padding padding type
 @param key key
 @param iv init vector
 @param error return err info
 @return  result,fail if return nil
 */
- (NSData*)LBXCryptWithOp:(LBXOperaton)op
                algorithm:(LBXAlgorithm)alg
               optionMode:(LBXOptionMode)om
                  padding:(LBXPaddingMode)padding
                      key:(id)key
                       iv:(id)iv
                    error:(NSError**)error;

devdatatool's People

Contributors

mxabc avatar abcmx-lbx avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.