如何使用Hash创建许可证文件以进行验证

时间:2015-09-12 23:09:12

标签: hash licensing license-key

我需要使用Hash创建许可证文件,如下例所示:

http://i.stack.imgur.com/YTD5m.png

当文件中的任何字符被更改或添加时,将不接受许可文件。

谢谢:*

1 个答案:

答案 0 :(得分:0)

好的,我需要创建一个包含字符串数据的许可证文件,如下所示:

users: .inf

:shards: 1

:collectors:

:collectors: 3

  :anonymizers: 9

:nia:

- 2

- true

:exploits: true

:gapi: 100

:rmi:

- true

- true

:alerting: true

:ocr: true

:profiling: true

:intelligence: true

:archive: 0

:connectors: true

:translation: false

:hostname_sync: false

:modify: true

:deletion: false

:check: 3OqZ1N5a

:digest_enc: true
***
and at the end of file i need to generate Hash like this :

***
:crc: $2a$10$rQULDKlViK8zQmFe2F1rT.dw.dXaG5f6mU7EerC188SBsp3t2IGz6

:sha1: 80987d0c145eb5a71294fce8306761aa36e4820318b7125e8f1ab66a42375b13

:digest: fb11b44a95a6cbce1b7d61294b827276fb1f1a70

:signature: 23235187453c677cba17d1f0b7c2a54b6c2f6ade8b9e8abdcea389d07873583e

:integrity: 34e4a6e23ea4bf8a4b5bc50d03bae5966a3ccd531bf31ac51e0c1dcebec5af7f77bd69f99521b17cf1eb344372b65d3a

检查字符串中的值是否有任何变化