Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 48 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
# md6
Md6-256
==========

md6 FTW
Contents/Menu
----------
* About
* Requirements
* License
* Download
* Issues/Feedbacks
* Contribution
* Credits

## Supports
About
----------
MD6-256 hash algoritm for PHP, Python and Javascript.

* php

## LICENSE
Requirements
----------
1. PHP | Python | Javascript

License
----------
```
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Expand All @@ -22,4 +35,32 @@ md6 FTW
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.
```
```

Download
----------
Download the latest version:
* Github:
* Zip: https://github.com/Snack-X/md6/archive/master.zip
* tAr.GZ: https://github.com/Snack-X/md6/archive/master.tar.gz
* SSh: git@github.com:Snack-X/md6.git

Issues/Feedbacks
----------
* Email: korsnack@korsnack.kr
* Website: http://korsnack.kr
* Via Github:
* https://github.com/Snack-X/md6/issues

Contribution
----------
* Send feedbacks.
* Submit bug reports.
* Fix bugs or add new features:
* Via Github:
* HTTPS: https://github.com/Snack-X/md6.git
* SSh: git@github.com:Snack-X/md6.git

Credits
----------
* Snack [Owner/Developer/Maintainer] <http://korsnack.kr>
2 changes: 1 addition & 1 deletion md6.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* md6hash for Javascript
* md6-256 hash algoritm for Javascript
*
* Usage :
* var md6 = new md6hash();
Expand Down
12 changes: 5 additions & 7 deletions md6.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
*
* md6hash for PHP
* md6-256 hash algoritm for PHP
*
* Usage :
* $md6 = new md6hash;
Expand Down Expand Up @@ -55,9 +55,8 @@ private function _shl($x, $n) {
if($n >= 32) {
return array(($b << ($n - 32)) & 0xffffffff, 0x00000000);
}
else {
return array((($a << $n) | ($b >> (32 - $n))) & 0xffffffff, ($b << $n) & 0xffffffff);
}

return array((($a << $n) | ($b >> (32 - $n))) & 0xffffffff, ($b << $n) & 0xffffffff);
}

private function _shr($x, $n) {
Expand All @@ -67,9 +66,8 @@ private function _shr($x, $n) {
if($n >= 32) {
return array(0x00000000, $a >> ($n - 32));
}
else {
return array(($a >> $n) & 0xffffffff, (($a << (32 - $n)) | ($b >> $n)) & 0xffffffff);
}

return array(($a >> $n) & 0xffffffff, (($a << (32 - $n)) | ($b >> $n)) & 0xffffffff);
}

private function crop($size, $hash, $right = false) {
Expand Down
2 changes: 1 addition & 1 deletion md6.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

#
# md6hash for Python 2, 3
# md6-256 hash algoritm for Python 2, 3
#
# Usage:
# md6 = md6hash()
Expand Down
2 changes: 1 addition & 1 deletion test/test.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require("../md6.php");
require "../md6.php";

$md6 = new md6hash();
$result = file("result.csv");
Expand Down