签名工具 sign

码农软件 · 软件分类 · 其他开发相关 · 2019-10-23 06:56:55

软件介绍

sign 签名工具, 给出任意一个字符串,可以生成基本不会重合的2个32位无符号的数字。如果自己是数字,那么就直接赋值给低位。检索用的可能比较多。

1 API

int create_sign64(const char* input, unsigned int* sign1, unsigned int* sign2);

input 是输入 sign1 是返回的高位 sign2 是返回的低位

2 代码范例

#include "sign.h"
#include <iostream>
using namespace std;

int main()
{
    unsigned int a, b;
    char s1[] = "-12345";
    char s2[] = "hello, 中国";
    create_sign64(s1, &a, &b);
    cout << a << "\t" << (int)b << endl;

    create_sign64(s2, &a, &b);
    cout << (int)a << "\t" << b << endl;
}

3 运行结果

liujuntekiMacBook-Pro:sample liujun$ ./sample 
0   -12345
2013960652  3228893707


本文地址:https://www.codercto.com/soft/d/17360.html

Developing Large Web Applications

Developing Large Web Applications

Kyle Loudon / Yahoo Press / 2010-3-15 / USD 34.99

As web applications grow, so do the challenges. These applications need to live up to demanding performance requirements, and be reliable around the clock every day of the year. And they need to withs......一起来看看 《Developing Large Web Applications》 这本书的介绍吧!

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具