└── src └── main ├── resources ├── static │ ├── less │ │ ├── mixins.less │ │ └── variables.less │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── font-awesome-4.1.0 │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ └── fontawesome-webfont.woff │ │ ├── less │ │ │ ├── fixed-width.less │ │ │ ├── core.less │ │ │ ├── bordered-pulled.less │ │ │ ├── rotated-flipped.less │ │ │ ├── larger.less │ │ │ ├── list.less │ │ │ ├── font-awesome.less │ │ │ ├── stacked.less │ │ │ ├── path.less │ │ │ ├── mixins.less │ │ │ └── spinning.less │ │ └── scss │ │ │ ├── _fixed-width.scss │ │ │ ├── _core.scss │ │ │ ├── _bordered-pulled.scss │ │ │ ├── _larger.scss │ │ │ ├── _rotated-flipped.scss │ │ │ ├── _list.scss │ │ │ ├── font-awesome.scss │ │ │ ├── _stacked.scss │ │ │ ├── _path.scss │ │ │ ├── _mixins.scss │ │ │ └── _spinning.scss │ ├── css │ │ └── plugins │ │ │ ├── morris.css │ │ │ └── metisMenu │ │ │ ├── metisMenu.min.css │ │ │ └── metisMenu.css │ └── js │ │ ├── sb-admin-2.js │ │ └── plugins │ │ ├── metisMenu │ │ ├── metisMenu.min.js │ │ └── metisMenu.js │ │ └── flot │ │ └── jquery.flot.resize.js ├── application.properties ├── templates │ ├── log.vm │ └── footer.vm └── banner.txt └── java ├── ish └── burst │ └── ms │ ├── objects │ ├── GeneratePlotRequest.java │ ├── api │ │ ├── Plots.java │ │ └── SystemInfo.java │ ├── CreatePlotRequest.java │ └── MiningPlot.java │ ├── controllers │ ├── web │ │ ├── LogController.java │ │ ├── SystemController.java │ │ ├── LocalStatsController.java │ │ └── APIController.java │ └── websocket │ │ └── PermissiveCORSFilter.java │ └── services │ └── FileSystemInfo.java ├── nxt └── crypto │ └── XoredData.java └── fr └── cryptohash ├── Shabal192.java ├── Shabal224.java ├── Shabal256.java ├── Shabal384.java ├── Shabal512.java ├── HAVAL128_3.java ├── HAVAL128_4.java ├── HAVAL128_5.java ├── HAVAL160_3.java ├── HAVAL160_4.java ├── HAVAL160_5.java ├── HAVAL192_3.java ├── HAVAL192_4.java ├── HAVAL192_5.java ├── HAVAL224_3.java ├── HAVAL224_4.java ├── HAVAL224_5.java ├── HAVAL256_3.java ├── HAVAL256_4.java ├── HAVAL256_5.java ├── Tiger.java ├── Keccak224.java ├── Keccak256.java ├── Keccak384.java ├── Keccak512.java ├── ECHO224.java ├── ECHO256.java ├── ECHO384.java ├── ECHO512.java ├── Luffa224.java ├── Luffa256.java ├── Groestl224.java ├── Groestl256.java ├── Groestl384.java ├── Groestl512.java ├── Tiger2.java ├── Hamsi256.java ├── Fugue224.java ├── Fugue256.java ├── BLAKE224.java ├── BLAKE256.java ├── SHA224.java ├── SHA256.java ├── Hamsi384.java ├── Hamsi512.java ├── BLAKE384.java ├── BLAKE512.java ├── SIMD224.java ├── SIMD256.java ├── SHA384.java ├── SHA512.java ├── BMW224.java ├── BMW256.java ├── SHAvite224.java ├── SHAvite256.java ├── JH224.java ├── JH256.java ├── JH384.java ├── JH512.java ├── Skein224.java ├── Skein256.java ├── Skein384.java ├── Skein512.java ├── SHAvite384.java ├── SHAvite512.java ├── Hamsi224.java ├── BMW384.java ├── BMW512.java ├── CubeHash224.java ├── CubeHash256.java ├── CubeHash384.java ├── CubeHash512.java ├── SIMD384.java └── SIMD512.java /src/main/resources/static/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | -------------------------------------------------------------------------------- /src/main/resources/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrpsion/burst-mining-system/HEAD/src/main/resources/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/resources/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrpsion/burst-mining-system/HEAD/src/main/resources/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrpsion/burst-mining-system/HEAD/src/main/resources/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrpsion/burst-mining-system/HEAD/src/main/resources/static/font-awesome-4.1.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrpsion/burst-mining-system/HEAD/src/main/resources/static/font-awesome-4.1.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrpsion/burst-mining-system/HEAD/src/main/resources/static/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrpsion/burst-mining-system/HEAD/src/main/resources/static/font-awesome-4.1.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font-family: FontAwesome; 7 | font-style: normal; 8 | font-weight: normal; 9 | line-height: 1; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font-family: FontAwesome; 7 | font-style: normal; 8 | font-weight: normal; 9 | line-height: 1; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8180 2 | netstat.update.time=10000 3 | plotmonitor.update.time=5000 4 | plot.folder=plots 5 | plot.generation.threads=8 6 | miner.threads=1 7 | miner.cpu.threads=2 8 | miner.cpu.enabled=false 9 | system.hosts= 10 | system.update.time=30000 11 | passphrase.file=passphrases.txt 12 | pool.type=uray 13 | logging.file=bms.log 14 | miner.cpu.address= -------------------------------------------------------------------------------- /src/main/java/ish/burst/ms/objects/GeneratePlotRequest.java: -------------------------------------------------------------------------------- 1 | package ish.burst.ms.objects; 2 | 3 | /** 4 | * Created by ihartney on 9/3/14. 5 | */ 6 | public class GeneratePlotRequest { 7 | 8 | private String UUID; 9 | 10 | public String getUUID() { 11 | return UUID; 12 | } 13 | 14 | public void setUUID(String UUID) { 15 | this.UUID = UUID; 16 | } 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/static/less/variables.less: -------------------------------------------------------------------------------- 1 | // Variables 2 | 3 | @gray-darker: lighten(#000, 13.5%); 4 | @gray-dark: lighten(#000, 20%); 5 | @gray: lighten(#000, 33.5%); 6 | @gray-light: lighten(#000, 60%); 7 | @gray-lighter: lighten(#000, 93.5%); 8 | @gray-lightest: lighten(#000, 97.25%); 9 | @brand-primary: #428bca; 10 | @brand-success: #5cb85c; 11 | @brand-info: #5bc0de; 12 | @brand-warning: #f0ad4e; 13 | @brand-danger: #d9534f; 14 | 15 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .@{fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/static/css/plugins/morris.css: -------------------------------------------------------------------------------- 1 | .morris-hover{position:absolute;z-index:1000}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255,255,255,0.8);border:solid 2px rgba(230,230,230,0.8);font-family:sans-serif;font-size:12px;text-align:center}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:bold;margin:0.25em 0} 2 | .morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0} 3 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: -@fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "spinning"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "spinning.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/css/plugins/metisMenu/metisMenu.min.css: -------------------------------------------------------------------------------- 1 | .arrow{float:right}.glyphicon.arrow:before{content:"\e079"}.active>a>.glyphicon.arrow:before{content:"\e114"}.fa.arrow:before{content:"\f104"}.active>a>.fa.arrow:before{content:"\f107"}.plus-times{float:right}.fa.plus-times:before{content:"\f067"}.active>a>.fa.plus-times{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.plus-minus{float:right}.fa.plus-minus:before{content:"\f067"}.active>a>.fa.plus-minus:before{content:"\f068"} -------------------------------------------------------------------------------- /src/main/resources/templates/log.vm: -------------------------------------------------------------------------------- 1 | #parse("header.vm") 2 |
3 |
 4 | 
 5 | 
 6 | 
7 |
8 | 9 | 28 | 29 | 30 | #include("footer.vm") -------------------------------------------------------------------------------- /src/main/java/ish/burst/ms/objects/api/Plots.java: -------------------------------------------------------------------------------- 1 | package ish.burst.ms.objects.api; 2 | 3 | import ish.burst.ms.objects.PlotFile; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | /** 9 | * Created by ihartney on 9/5/14. 10 | */ 11 | public class Plots { 12 | 13 | public List getPlots() { 14 | return plots; 15 | } 16 | 17 | public void setPlots(List plots) { 18 | this.plots = plots; 19 | } 20 | 21 | private List plots; 22 | 23 | public Plots(ArrayList pPlots){ 24 | plots = new ArrayList(); 25 | for(PlotFile file : pPlots){ 26 | plots.add(new Plot(file)); 27 | } 28 | } 29 | 30 | public Plots(){ 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/templates/footer.vm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
6 |

Burst Mining System v1.21 by MrPsion burst: BURST-JSES-5WN7-PHD8-7CQJ6 bitcoin: 1JiwTkmeztRh7WSD9DaRxkJCYxDfMJvKoJ

7 |
8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 9 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 10 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 11 | //src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}')"; 7 | src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype')", 8 | ~"url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff')", 9 | ~"url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype')", 10 | ~"url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg')"; 11 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon-rotate(@degrees, @rotation) { 5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); 6 | -webkit-transform: rotate(@degrees); 7 | -moz-transform: rotate(@degrees); 8 | -ms-transform: rotate(@degrees); 9 | -o-transform: rotate(@degrees); 10 | transform: rotate(@degrees); 11 | } 12 | 13 | .fa-icon-flip(@horiz, @vert, @rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); 15 | -webkit-transform: scale(@horiz, @vert); 16 | -moz-transform: scale(@horiz, @vert); 17 | -ms-transform: scale(@horiz, @vert); 18 | -o-transform: scale(@horiz, @vert); 19 | transform: scale(@horiz, @vert); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon-rotate($degrees, $rotation) { 5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 6 | -webkit-transform: rotate($degrees); 7 | -moz-transform: rotate($degrees); 8 | -ms-transform: rotate($degrees); 9 | -o-transform: rotate($degrees); 10 | transform: rotate($degrees); 11 | } 12 | 13 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 15 | -webkit-transform: scale($horiz, $vert); 16 | -moz-transform: scale($horiz, $vert); 17 | -ms-transform: scale($horiz, $vert); 18 | -o-transform: scale($horiz, $vert); 19 | transform: scale($horiz, $vert); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/ish/burst/ms/controllers/web/LogController.java: -------------------------------------------------------------------------------- 1 | package ish.burst.ms.controllers.web; 2 | 3 | import ish.burst.ms.services.SystemService; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RequestParam; 8 | 9 | import java.util.Map; 10 | 11 | /** 12 | * Created by ihartney on 9/7/14. 13 | */ 14 | 15 | @Controller 16 | public class LogController { 17 | 18 | @Autowired 19 | SystemService systemService; 20 | 21 | @RequestMapping("/log") 22 | public String log(@RequestParam(value = "host", defaultValue = "local") String host, Map model) { 23 | 24 | model.put("systemInfos",systemService.getSystemInfos()); 25 | model.put("host",host); 26 | return "log"; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/less/spinning.less: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: spin 2s infinite linear; 6 | -moz-animation: spin 2s infinite linear; 7 | -o-animation: spin 2s infinite linear; 8 | animation: spin 2s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @keyframes spin { 24 | 0% { 25 | -webkit-transform: rotate(0deg); 26 | transform: rotate(0deg); 27 | } 28 | 100% { 29 | -webkit-transform: rotate(359deg); 30 | transform: rotate(359deg); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/resources/static/font-awesome-4.1.0/scss/_spinning.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: spin 2s infinite linear; 6 | -moz-animation: spin 2s infinite linear; 7 | -o-animation: spin 2s infinite linear; 8 | animation: spin 2s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @keyframes spin { 24 | 0% { 25 | -webkit-transform: rotate(0deg); 26 | transform: rotate(0deg); 27 | } 28 | 100% { 29 | -webkit-transform: rotate(359deg); 30 | transform: rotate(359deg); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | __________ __ 2 | \______ \__ _________ _______/ |_ 3 | | | _/ | \_ __ \/ ___/\ __\ 4 | | | \ | /| | \/\___ \ | | 5 | |______ /____/ |__| /____ > |__| 6 | _____\/.__ .__ \/ _________ __ 7 | / \ |__| ____ |__| ____ ____ / _____/__.__. _______/ |_ ____ _____ 8 | / \ / \| |/ \| |/ \ / ___\ \_____ < | |/ ___/\ __\/ __ \ / \ 9 | / Y \ | | \ | | \/ /_/ > / \___ |\___ \ | | \ ___/| Y Y \ 10 | \____|__ /__|___| /__|___| /\___ / /_______ / ____/____ > |__| \___ >__|_| / 11 | \/ \/ \//_____/ \/\/ \/ \/ \/ 12 | -------------------------------------------------------------------------------- /src/main/resources/static/js/sb-admin-2.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | $('#side-menu').metisMenu(); 4 | 5 | }); 6 | 7 | //Loads the correct sidebar on window load, 8 | //collapses the sidebar on window resize. 9 | // Sets the min-height of #page-wrapper to window size 10 | $(function() { 11 | $(window).bind("load resize", function() { 12 | topOffset = 50; 13 | width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width; 14 | if (width < 768) { 15 | $('div.navbar-collapse').addClass('collapse') 16 | topOffset = 100; // 2-row-menu 17 | } else { 18 | $('div.navbar-collapse').removeClass('collapse') 19 | } 20 | 21 | height = (this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height; 22 | height = height - topOffset; 23 | if (height < 1) height = 1; 24 | if (height > topOffset) { 25 | $("#page-wrapper").css("min-height", (height) + "px"); 26 | } 27 | }) 28 | }) 29 | -------------------------------------------------------------------------------- /src/main/java/ish/burst/ms/services/FileSystemInfo.java: -------------------------------------------------------------------------------- 1 | package ish.burst.ms.services; 2 | 3 | import org.springframework.context.annotation.Scope; 4 | import org.springframework.stereotype.Service; 5 | 6 | import java.io.File; 7 | 8 | /** 9 | * Created by ihartney on 9/1/14. 10 | */ 11 | @Service 12 | @Scope("singleton") 13 | public class FileSystemInfo { 14 | 15 | File workingDir; 16 | 17 | public FileSystemInfo(){ 18 | workingDir = new File(System.getProperty("user.dir")); 19 | } 20 | 21 | public long getTotalSpace(){ 22 | return workingDir.getTotalSpace(); 23 | } 24 | 25 | public long getUseableSpace(){ 26 | return workingDir.getUsableSpace(); 27 | } 28 | 29 | public String getMinerBaseDirectory(){ 30 | return workingDir.getAbsolutePath(); 31 | } 32 | 33 | public double getTotalSpaceMb(){ 34 | return (getTotalSpace() / 1024 / 1024); 35 | } 36 | 37 | public double getUseableSpaceMb(){ 38 | return (getUseableSpace() / 1024 / 1024); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/ish/burst/ms/objects/CreatePlotRequest.java: -------------------------------------------------------------------------------- 1 | package ish.burst.ms.objects; 2 | 3 | /** 4 | * Created by ihartney on 9/3/14. 5 | */ 6 | public class CreatePlotRequest { 7 | 8 | private String address; 9 | private String startnonce; 10 | private String plots; 11 | private String staggeramt; 12 | 13 | public String getStaggeramt() { 14 | return staggeramt; 15 | } 16 | 17 | public void setStaggeramt(String staggeramt) { 18 | this.staggeramt = staggeramt; 19 | } 20 | 21 | public String getAddress() { 22 | return address; 23 | } 24 | 25 | public void setAddress(String address) { 26 | this.address = address; 27 | } 28 | 29 | public String getStartnonce() { 30 | return startnonce; 31 | } 32 | 33 | public void setStartnonce(String startnonce) { 34 | this.startnonce = startnonce; 35 | } 36 | 37 | public String getPlots() { 38 | return plots; 39 | } 40 | 41 | public void setPlots(String plots) { 42 | this.plots = plots; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/nxt/crypto/XoredData.java: -------------------------------------------------------------------------------- 1 | package nxt.crypto; 2 | 3 | public final class XoredData { 4 | 5 | private final byte[] data; 6 | private final byte[] nonce; 7 | 8 | public XoredData(byte[] data, byte[] nonce) { 9 | this.data = data; 10 | this.nonce = nonce; 11 | } 12 | 13 | public static XoredData encrypt(byte[] plaintext, byte[] myPrivateKey, byte[] theirPublicKey) { 14 | byte[] nonce = Crypto.xorEncrypt(plaintext, 0, plaintext.length, myPrivateKey, theirPublicKey); 15 | return new XoredData(plaintext, nonce); 16 | } 17 | 18 | public byte[] decrypt(byte[] myPrivateKey, byte[] theirPublicKey) { 19 | byte[] ciphertext = new byte[getData().length]; 20 | System.arraycopy(getData(), 0, ciphertext, 0, ciphertext.length); 21 | Crypto.xorDecrypt(ciphertext, 0, ciphertext.length, myPrivateKey, theirPublicKey, getNonce()); 22 | return ciphertext; 23 | } 24 | 25 | public byte[] getData() { 26 | return data; 27 | } 28 | 29 | public byte[] getNonce() { 30 | return nonce; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/ish/burst/ms/controllers/websocket/PermissiveCORSFilter.java: -------------------------------------------------------------------------------- 1 | package ish.burst.ms.controllers.websocket; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | import javax.servlet.*; 6 | import javax.servlet.http.HttpServletResponse; 7 | import java.io.IOException; 8 | 9 | /** 10 | * Created by ihartney on 9/8/14. 11 | */ 12 | @Component 13 | public class PermissiveCORSFilter implements Filter { 14 | 15 | @Override 16 | public void init(FilterConfig filterConfig) throws ServletException { 17 | 18 | } 19 | 20 | @Override 21 | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { 22 | HttpServletResponse response = (HttpServletResponse) servletResponse; 23 | response.setHeader("Access-Control-Allow-Origin", "*"); 24 | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); 25 | response.setHeader("Access-Control-Max-Age", "3600"); 26 | response.setHeader("Access-Control-Allow-Headers", "x-requested-with"); 27 | filterChain.doFilter(servletRequest, servletResponse); 28 | } 29 | 30 | @Override 31 | public void destroy() { 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/metisMenu/metisMenu.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * metismenu - v1.0.3 3 | * Easy menu jQuery plugin for Twitter Bootstrap 3 4 | * https://github.com/onokumus/metisMenu 5 | * 6 | * Made by Osman Nuri Okumuş 7 | * Under MIT License 8 | */ 9 | !function(a,b,c){function d(b,c){this.element=b,this.settings=a.extend({},f,c),this._defaults=f,this._name=e,this.init()}var e="metisMenu",f={toggle:!0};d.prototype={init:function(){var b=a(this.element),c=this.settings.toggle;this.isIE()<=9?(b.find("li.active").has("ul").children("ul").collapse("show"),b.find("li").not(".active").has("ul").children("ul").collapse("hide")):(b.find("li.active").has("ul").children("ul").addClass("collapse in"),b.find("li").not(".active").has("ul").children("ul").addClass("collapse")),b.find("li").has("ul").children("a").on("click",function(b){b.preventDefault(),a(this).parent("li").toggleClass("active").children("ul").collapse("toggle"),c&&a(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide")})},isIE:function(){for(var a,b=3,d=c.createElement("div"),e=d.getElementsByTagName("i");d.innerHTML="",e[0];)return b>4?b:a}},a.fn[e]=function(b){return this.each(function(){a.data(this,"plugin_"+e)||a.data(this,"plugin_"+e,new d(this,b))})}}(jQuery,window,document); -------------------------------------------------------------------------------- /src/main/resources/static/css/plugins/metisMenu/metisMenu.css: -------------------------------------------------------------------------------- 1 | /* 2 | * metismenu - v1.0.3 3 | * Easy menu jQuery plugin for Twitter Bootstrap 3 4 | * https://github.com/onokumus/metisMenu 5 | * 6 | * Made by Osman Nuri Okumuş 7 | * Under MIT License 8 | */ 9 | .arrow { 10 | float: right; 11 | } 12 | 13 | .glyphicon.arrow:before { 14 | content: "\e079"; 15 | } 16 | 17 | .active > a > .glyphicon.arrow:before { 18 | content: "\e114"; 19 | } 20 | 21 | 22 | /* 23 | * Require Font-Awesome 24 | * http://fortawesome.github.io/Font-Awesome/ 25 | */ 26 | 27 | 28 | .fa.arrow:before { 29 | content: "\f104"; 30 | } 31 | 32 | .active > a > .fa.arrow:before { 33 | content: "\f107"; 34 | } 35 | 36 | .plus-times { 37 | float: right; 38 | } 39 | 40 | .fa.plus-times:before { 41 | content: "\f067"; 42 | } 43 | 44 | .active > a > .fa.plus-times { 45 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); 46 | -webkit-transform: rotate(45deg); 47 | -moz-transform: rotate(45deg); 48 | -ms-transform: rotate(45deg); 49 | -o-transform: rotate(45deg); 50 | transform: rotate(45deg); 51 | } 52 | 53 | .plus-minus { 54 | float: right; 55 | } 56 | 57 | .fa.plus-minus:before { 58 | content: "\f067"; 59 | } 60 | 61 | .active > a > .fa.plus-minus:before { 62 | content: "\f068"; 63 | } -------------------------------------------------------------------------------- /src/main/java/ish/burst/ms/controllers/web/SystemController.java: -------------------------------------------------------------------------------- 1 | package ish.burst.ms.controllers.web; 2 | 3 | import ish.burst.ms.objects.api.Plot; 4 | import ish.burst.ms.objects.api.Plots; 5 | import ish.burst.ms.services.PlotService; 6 | import ish.burst.ms.services.SystemService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | 11 | import java.util.List; 12 | import java.util.Map; 13 | 14 | /** 15 | * Created by ihartney on 9/5/14. 16 | */ 17 | @Controller 18 | public class SystemController { 19 | 20 | @Autowired 21 | SystemService systemService; 22 | 23 | 24 | @RequestMapping("/system") 25 | public String systemdashboard(Map model) { 26 | 27 | List plots = systemService.getSystemPlots(); 28 | model.put("plots",plots); 29 | 30 | double totalFileSize = 0; 31 | double totalExpected = 0; 32 | int totalShares = 0; 33 | int totalChecked = 0; 34 | int totalInterrupted = 0; 35 | double totalSharesPerBlock = 0d; 36 | for(Plot p : plots){ 37 | totalFileSize+=p.getFileSizeGb(); 38 | totalExpected+=p.getExpectedFileSizeGb(); 39 | totalShares+=p.getSharesFound(); 40 | totalChecked+=p.getTimesChecked(); 41 | totalInterrupted+=p.getTimesIncomplete(); 42 | totalSharesPerBlock+=p.getSharesPerBlock(); 43 | } 44 | 45 | model.put("totalSize",totalFileSize); 46 | model.put("totalExpected",totalExpected); 47 | model.put("totalShares",totalShares); 48 | model.put("totalChecked",totalChecked); 49 | model.put("totalInterrupted",totalInterrupted); 50 | model.put("totalSharesPerBlock",totalSharesPerBlock); 51 | 52 | model.put("systemInfos",systemService.getSystemInfos()); 53 | 54 | return "system"; 55 | } 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/ish/burst/ms/objects/MiningPlot.java: -------------------------------------------------------------------------------- 1 | package ish.burst.ms.objects; 2 | 3 | import fr.cryptohash.Shabal256; 4 | 5 | import java.nio.ByteBuffer; 6 | import java.util.Arrays; 7 | 8 | /** 9 | * Created by ihartney on 9/2/14. 10 | * Copied from pocminer_v1 11 | * 12 | */ 13 | public class MiningPlot { 14 | public static int HASH_SIZE = 32; 15 | public static int HASHES_PER_SCOOP = 2; 16 | public static int SCOOP_SIZE = HASHES_PER_SCOOP * HASH_SIZE; 17 | public static int SCOOPS_PER_PLOT = 4096; // original 1MB/plot = 16384 18 | public static int PLOT_SIZE = SCOOPS_PER_PLOT * SCOOP_SIZE; 19 | 20 | public static int HASH_CAP = 4096; 21 | 22 | public byte[] data = new byte[PLOT_SIZE]; 23 | 24 | public MiningPlot(long addr, long nonce) { 25 | ByteBuffer base_buffer = ByteBuffer.allocate(16); 26 | base_buffer.putLong(addr); 27 | base_buffer.putLong(nonce); 28 | byte[] base = base_buffer.array(); 29 | Shabal256 md = new Shabal256(); 30 | byte[] gendata = new byte[PLOT_SIZE + base.length]; 31 | System.arraycopy(base, 0, gendata, PLOT_SIZE, base.length); 32 | for(int i = PLOT_SIZE; i > 0; i -= HASH_SIZE) { 33 | md.reset(); 34 | int len = PLOT_SIZE + base.length - i; 35 | if(len > HASH_CAP) { 36 | len = HASH_CAP; 37 | } 38 | md.update(gendata, i, len); 39 | md.digest(gendata, i - HASH_SIZE, HASH_SIZE); 40 | } 41 | md.reset(); 42 | md.update(gendata); 43 | byte[] finalhash = md.digest(); 44 | for(int i = 0; i < PLOT_SIZE; i++) { 45 | data[i] = (byte) (gendata[i] ^ finalhash[i % HASH_SIZE]); 46 | } 47 | } 48 | 49 | public byte[] getScoop(int pos) { 50 | return Arrays.copyOfRange(data, pos * SCOOP_SIZE, (pos + 1) * SCOOP_SIZE); 51 | } 52 | 53 | public void hashScoop(Shabal256 md, int pos) { 54 | md.update(data, pos * SCOOP_SIZE, SCOOP_SIZE); 55 | } 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Shabal192.java: -------------------------------------------------------------------------------- 1 | // $Id: Shabal192.java 213 2010-06-03 02:48:09Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Shabal-192 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 213 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Shabal192 extends ShabalGeneric { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Shabal192() 46 | { 47 | super(192); 48 | } 49 | 50 | /** @see ShabalGeneric */ 51 | ShabalGeneric dup() 52 | { 53 | return new Shabal192(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Shabal224.java: -------------------------------------------------------------------------------- 1 | // $Id: Shabal224.java 213 2010-06-03 02:48:09Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Shabal-224 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 213 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Shabal224 extends ShabalGeneric { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Shabal224() 46 | { 47 | super(224); 48 | } 49 | 50 | /** @see ShabalGeneric */ 51 | ShabalGeneric dup() 52 | { 53 | return new Shabal224(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Shabal256.java: -------------------------------------------------------------------------------- 1 | // $Id: Shabal256.java 213 2010-06-03 02:48:09Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Shabal-256 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 213 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Shabal256 extends ShabalGeneric { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Shabal256() 46 | { 47 | super(256); 48 | } 49 | 50 | /** @see ShabalGeneric */ 51 | ShabalGeneric dup() 52 | { 53 | return new Shabal256(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Shabal384.java: -------------------------------------------------------------------------------- 1 | // $Id: Shabal384.java 213 2010-06-03 02:48:09Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Shabal-384 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 213 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Shabal384 extends ShabalGeneric { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Shabal384() 46 | { 47 | super(384); 48 | } 49 | 50 | /** @see ShabalGeneric */ 51 | ShabalGeneric dup() 52 | { 53 | return new Shabal384(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Shabal512.java: -------------------------------------------------------------------------------- 1 | // $Id: Shabal512.java 213 2010-06-03 02:48:09Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Shabal-512 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 213 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Shabal512 extends ShabalGeneric { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Shabal512() 46 | { 47 | super(512); 48 | } 49 | 50 | /** @see ShabalGeneric */ 51 | ShabalGeneric dup() 52 | { 53 | return new Shabal512(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/ish/burst/ms/controllers/web/LocalStatsController.java: -------------------------------------------------------------------------------- 1 | package ish.burst.ms.controllers.web; 2 | 3 | import ish.burst.ms.objects.CreatePlotRequest; 4 | import ish.burst.ms.objects.GeneratePlotRequest; 5 | import ish.burst.ms.services.FileSystemInfo; 6 | import ish.burst.ms.services.NetStateService; 7 | import ish.burst.ms.services.PlotService; 8 | import ish.burst.ms.services.SystemService; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.web.bind.annotation.ModelAttribute; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RequestMethod; 14 | 15 | import java.util.Map; 16 | 17 | /** 18 | * Created by ihartney on 9/1/14. 19 | */ 20 | @Controller 21 | public class LocalStatsController { 22 | 23 | @Autowired 24 | FileSystemInfo fileSystemInfo; 25 | 26 | @Autowired 27 | NetStateService netStateService; 28 | 29 | @Autowired 30 | PlotService plotService; 31 | 32 | @Autowired 33 | SystemService systemService; 34 | 35 | 36 | @RequestMapping("/") 37 | public String localdashboard(Map model) { 38 | model.put("fileSystemInfo",fileSystemInfo); 39 | model.put("netState",netStateService.getCurrentState()); 40 | model.put("plots",plotService.getPlots()); 41 | model.put("systemInfos",systemService.getSystemInfos()); 42 | return "local"; 43 | } 44 | 45 | @RequestMapping(value="/addplot", method= RequestMethod.POST) 46 | public String addplot(@ModelAttribute CreatePlotRequest createRequest, Map model) { 47 | plotService.createPlot(createRequest); 48 | return "redirect:/"; 49 | } 50 | 51 | 52 | @RequestMapping(value="/generateplot", method= RequestMethod.POST) 53 | public String generateplot(@ModelAttribute GeneratePlotRequest generateRequest, Map model) { 54 | plotService.generatePlot(generateRequest); 55 | return "redirect:/"; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL128_3.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL128_3.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 128-bit output and 3 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL128_3 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL128_3() 45 | { 46 | super(128, 3); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 16; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL128_3()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL128_4.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL128_4.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 128-bit output and 4 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL128_4 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL128_4() 45 | { 46 | super(128, 4); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 16; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL128_4()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL128_5.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL128_5.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 128-bit output and 5 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL128_5 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL128_5() 45 | { 46 | super(128, 5); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 16; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL128_5()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL160_3.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL160_3.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 160-bit output and 3 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL160_3 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL160_3() 45 | { 46 | super(160, 3); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 20; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL160_3()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL160_4.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL160_4.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 160-bit output and 4 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL160_4 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL160_4() 45 | { 46 | super(160, 4); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 20; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL160_4()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL160_5.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL160_5.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 160-bit output and 5 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL160_5 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL160_5() 45 | { 46 | super(160, 5); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 20; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL160_5()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL192_3.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL192_3.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 192-bit output and 3 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL192_3 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL192_3() 45 | { 46 | super(192, 3); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 24; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL192_3()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL192_4.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL192_4.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 192-bit output and 4 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL192_4 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL192_4() 45 | { 46 | super(192, 4); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 24; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL192_4()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL192_5.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL192_5.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 192-bit output and 5 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL192_5 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL192_5() 45 | { 46 | super(192, 5); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 24; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL192_5()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL224_3.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL224_3.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 224-bit output and 3 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL224_3 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL224_3() 45 | { 46 | super(224, 3); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 28; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL224_3()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL224_4.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL224_4.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 224-bit output and 4 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL224_4 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL224_4() 45 | { 46 | super(224, 4); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 28; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL224_4()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL224_5.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL224_5.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 224-bit output and 5 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL224_5 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL224_5() 45 | { 46 | super(224, 5); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 28; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL224_5()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL256_3.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL256_3.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 256-bit output and 3 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL256_3 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL256_3() 45 | { 46 | super(256, 3); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 32; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL256_3()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL256_4.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL256_4.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 256-bit output and 4 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL256_4 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL256_4() 45 | { 46 | super(256, 4); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 32; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL256_4()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/HAVAL256_5.java: -------------------------------------------------------------------------------- 1 | // $Id: HAVAL256_5.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | * This class implements HAVAL with 256-bit output and 5 passes. 7 | * 8 | *
 9 |  * ==========================(LICENSE BEGIN)============================
10 |  *
11 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
12 |  * 
13 |  * Permission is hereby granted, free of charge, to any person obtaining
14 |  * a copy of this software and associated documentation files (the
15 |  * "Software"), to deal in the Software without restriction, including
16 |  * without limitation the rights to use, copy, modify, merge, publish,
17 |  * distribute, sublicense, and/or sell copies of the Software, and to
18 |  * permit persons to whom the Software is furnished to do so, subject to
19 |  * the following conditions:
20 |  * 
21 |  * The above copyright notice and this permission notice shall be
22 |  * included in all copies or substantial portions of the Software.
23 |  * 
24 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 |  *
32 |  * ===========================(LICENSE END)=============================
33 |  * 
34 | * 35 | * @version $Revision: 156 $ 36 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 37 | */ 38 | 39 | public class HAVAL256_5 extends HAVALCore { 40 | 41 | /** 42 | * Create the object. 43 | */ 44 | public HAVAL256_5() 45 | { 46 | super(256, 5); 47 | } 48 | 49 | /** @see Digest */ 50 | public int getDigestLength() 51 | { 52 | return 32; 53 | } 54 | 55 | /** @see Digest */ 56 | public Digest copy() 57 | { 58 | return copyState(new HAVAL256_5()); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Tiger.java: -------------------------------------------------------------------------------- 1 | // $Id: Tiger.java 214 2010-06-03 17:25:08Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Tiger hash algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 214 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Tiger extends TigerCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Tiger() 46 | { 47 | super((byte)0x01); 48 | } 49 | 50 | /** @see Digest */ 51 | public Digest copy() 52 | { 53 | return copyState(new Tiger()); 54 | } 55 | 56 | /** @see Digest */ 57 | public String toString() 58 | { 59 | return "Tiger"; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Keccak224.java: -------------------------------------------------------------------------------- 1 | // $Id: Keccak224.java 189 2010-05-14 21:21:46Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Keccak-224 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 189 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Keccak224 extends KeccakCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Keccak224() 46 | { 47 | } 48 | 49 | /** @see Digest */ 50 | public Digest copy() 51 | { 52 | return copyState(new Keccak224()); 53 | } 54 | 55 | /** @see Digest */ 56 | public int getDigestLength() 57 | { 58 | return 28; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Keccak256.java: -------------------------------------------------------------------------------- 1 | // $Id: Keccak256.java 189 2010-05-14 21:21:46Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Keccak-256 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 189 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Keccak256 extends KeccakCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Keccak256() 46 | { 47 | } 48 | 49 | /** @see Digest */ 50 | public Digest copy() 51 | { 52 | return copyState(new Keccak256()); 53 | } 54 | 55 | /** @see Digest */ 56 | public int getDigestLength() 57 | { 58 | return 32; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Keccak384.java: -------------------------------------------------------------------------------- 1 | // $Id: Keccak384.java 189 2010-05-14 21:21:46Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Keccak-384 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 189 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Keccak384 extends KeccakCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Keccak384() 46 | { 47 | } 48 | 49 | /** @see Digest */ 50 | public Digest copy() 51 | { 52 | return copyState(new Keccak384()); 53 | } 54 | 55 | /** @see Digest */ 56 | public int getDigestLength() 57 | { 58 | return 48; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Keccak512.java: -------------------------------------------------------------------------------- 1 | // $Id: Keccak512.java 189 2010-05-14 21:21:46Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Keccak-512 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 189 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Keccak512 extends KeccakCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Keccak512() 46 | { 47 | } 48 | 49 | /** @see Digest */ 50 | public Digest copy() 51 | { 52 | return copyState(new Keccak512()); 53 | } 54 | 55 | /** @see Digest */ 56 | public int getDigestLength() 57 | { 58 | return 64; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/ECHO224.java: -------------------------------------------------------------------------------- 1 | // $Id: ECHO224.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the ECHO-224 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 156 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class ECHO224 extends ECHOSmallCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public ECHO224() 46 | { 47 | super(); 48 | } 49 | 50 | /** @see Digest */ 51 | public int getDigestLength() 52 | { 53 | return 28; 54 | } 55 | 56 | /** @see Digest */ 57 | public Digest copy() 58 | { 59 | return copyState(new ECHO224()); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/ECHO256.java: -------------------------------------------------------------------------------- 1 | // $Id: ECHO256.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the ECHO-256 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 156 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class ECHO256 extends ECHOSmallCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public ECHO256() 46 | { 47 | super(); 48 | } 49 | 50 | /** @see Digest */ 51 | public int getDigestLength() 52 | { 53 | return 32; 54 | } 55 | 56 | /** @see Digest */ 57 | public Digest copy() 58 | { 59 | return copyState(new ECHO256()); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/ECHO384.java: -------------------------------------------------------------------------------- 1 | // $Id: ECHO384.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the ECHO-384 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 156 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class ECHO384 extends ECHOBigCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public ECHO384() 46 | { 47 | super(); 48 | } 49 | 50 | /** @see Digest */ 51 | public int getDigestLength() 52 | { 53 | return 48; 54 | } 55 | 56 | /** @see Digest */ 57 | public Digest copy() 58 | { 59 | return copyState(new ECHO384()); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/ECHO512.java: -------------------------------------------------------------------------------- 1 | // $Id: ECHO512.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the ECHO-512 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 156 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class ECHO512 extends ECHOBigCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public ECHO512() 46 | { 47 | super(); 48 | } 49 | 50 | /** @see Digest */ 51 | public int getDigestLength() 52 | { 53 | return 64; 54 | } 55 | 56 | /** @see Digest */ 57 | public Digest copy() 58 | { 59 | return copyState(new ECHO512()); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Luffa224.java: -------------------------------------------------------------------------------- 1 | // $Id: Luffa224.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Luffa-224 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 156 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Luffa224 extends LuffaSmallCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Luffa224() 46 | { 47 | super(); 48 | } 49 | 50 | /** @see Digest */ 51 | public int getDigestLength() 52 | { 53 | return 28; 54 | } 55 | 56 | /** @see Digest */ 57 | public Digest copy() 58 | { 59 | return copyState(new Luffa224()); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Luffa256.java: -------------------------------------------------------------------------------- 1 | // $Id: Luffa256.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Luffa-256 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 156 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Luffa256 extends LuffaSmallCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Luffa256() 46 | { 47 | super(); 48 | } 49 | 50 | /** @see Digest */ 51 | public int getDigestLength() 52 | { 53 | return 32; 54 | } 55 | 56 | /** @see Digest */ 57 | public Digest copy() 58 | { 59 | return copyState(new Luffa256()); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Groestl224.java: -------------------------------------------------------------------------------- 1 | // $Id: Groestl224.java 198 2010-05-27 16:45:04Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Groestl-224 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 198 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Groestl224 extends GroestlSmallCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Groestl224() 46 | { 47 | super(); 48 | } 49 | 50 | /** @see Digest */ 51 | public int getDigestLength() 52 | { 53 | return 28; 54 | } 55 | 56 | /** @see Digest */ 57 | public Digest copy() 58 | { 59 | return copyState(new Groestl224()); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Groestl256.java: -------------------------------------------------------------------------------- 1 | // $Id: Groestl256.java 198 2010-05-27 16:45:04Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Groestl-256 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 198 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Groestl256 extends GroestlSmallCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Groestl256() 46 | { 47 | super(); 48 | } 49 | 50 | /** @see Digest */ 51 | public int getDigestLength() 52 | { 53 | return 32; 54 | } 55 | 56 | /** @see Digest */ 57 | public Digest copy() 58 | { 59 | return copyState(new Groestl256()); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Groestl384.java: -------------------------------------------------------------------------------- 1 | // $Id: Groestl384.java 198 2010-05-27 16:45:04Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Groestl-384 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 198 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Groestl384 extends GroestlBigCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Groestl384() 46 | { 47 | super(); 48 | } 49 | 50 | /** @see Digest */ 51 | public int getDigestLength() 52 | { 53 | return 48; 54 | } 55 | 56 | /** @see Digest */ 57 | public Digest copy() 58 | { 59 | return copyState(new Groestl384()); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Groestl512.java: -------------------------------------------------------------------------------- 1 | // $Id: Groestl512.java 198 2010-05-27 16:45:04Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Groestl-512 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 198 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Groestl512 extends GroestlBigCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Groestl512() 46 | { 47 | super(); 48 | } 49 | 50 | /** @see Digest */ 51 | public int getDigestLength() 52 | { 53 | return 64; 54 | } 55 | 56 | /** @see Digest */ 57 | public Digest copy() 58 | { 59 | return copyState(new Groestl512()); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/ish/burst/ms/controllers/web/APIController.java: -------------------------------------------------------------------------------- 1 | package ish.burst.ms.controllers.web; 2 | 3 | import com.thetransactioncompany.jsonrpc2.JSONRPC2Error; 4 | import com.thetransactioncompany.jsonrpc2.JSONRPC2ParseException; 5 | import com.thetransactioncompany.jsonrpc2.JSONRPC2Request; 6 | import com.thetransactioncompany.jsonrpc2.JSONRPC2Response; 7 | import com.thetransactioncompany.jsonrpc2.server.Dispatcher; 8 | import ish.burst.ms.objects.api.Plots; 9 | import ish.burst.ms.objects.api.SystemInfo; 10 | import ish.burst.ms.services.MiningService; 11 | import ish.burst.ms.services.NetStateService; 12 | import ish.burst.ms.services.PlotService; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.stereotype.Controller; 15 | import org.springframework.web.bind.annotation.RequestBody; 16 | import org.springframework.web.bind.annotation.RequestMapping; 17 | import org.springframework.web.bind.annotation.RequestMethod; 18 | import org.springframework.web.bind.annotation.ResponseBody; 19 | 20 | import java.util.Map; 21 | 22 | /** 23 | * Created by ihartney on 9/2/14. 24 | */ 25 | @Controller 26 | @RequestMapping("/api") 27 | public class APIController { 28 | 29 | @Autowired 30 | PlotService plotService; 31 | 32 | @Autowired 33 | NetStateService netStateService; 34 | 35 | @Autowired 36 | MiningService miningService; 37 | 38 | @RequestMapping(value = "/plots", method = RequestMethod.GET) 39 | public @ResponseBody Plots getPlots() { 40 | Plots plots = new Plots(plotService.getPlots()); 41 | return plots; 42 | } 43 | 44 | @RequestMapping(value = "/system_info", method = RequestMethod.GET) 45 | public @ResponseBody SystemInfo getSystemInfo() { 46 | SystemInfo info = new SystemInfo(); 47 | long uptime = System.currentTimeMillis() - netStateService.getStartUpTime(); 48 | long timeSinceLastShare = System.currentTimeMillis() - miningService.getLastShareSubmitTime(); 49 | info.setTimeSinceLastShare(timeSinceLastShare); 50 | info.setUptime(uptime); 51 | return info; 52 | } 53 | 54 | 55 | 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Tiger2.java: -------------------------------------------------------------------------------- 1 | // $Id: Tiger2.java 214 2010-06-03 17:25:08Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Tiger2 hash algorithm under the 7 | * {@link Digest} API. Tiger2 differs from Tiger by the padding, 8 | * which is identical to that of MD4/MD5 in Tiger2, but not in Tiger.

9 | * 10 | *
11 |  * ==========================(LICENSE BEGIN)============================
12 |  *
13 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
14 |  * 
15 |  * Permission is hereby granted, free of charge, to any person obtaining
16 |  * a copy of this software and associated documentation files (the
17 |  * "Software"), to deal in the Software without restriction, including
18 |  * without limitation the rights to use, copy, modify, merge, publish,
19 |  * distribute, sublicense, and/or sell copies of the Software, and to
20 |  * permit persons to whom the Software is furnished to do so, subject to
21 |  * the following conditions:
22 |  * 
23 |  * The above copyright notice and this permission notice shall be
24 |  * included in all copies or substantial portions of the Software.
25 |  * 
26 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
30 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
32 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 |  *
34 |  * ===========================(LICENSE END)=============================
35 |  * 
36 | * 37 | * @version $Revision: 214 $ 38 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 39 | */ 40 | 41 | public class Tiger2 extends TigerCore { 42 | 43 | /** 44 | * Create the engine. 45 | */ 46 | public Tiger2() 47 | { 48 | super((byte)0x80); 49 | } 50 | 51 | /** @see Digest */ 52 | public Digest copy() 53 | { 54 | return copyState(new Tiger2()); 55 | } 56 | 57 | /** @see Digest */ 58 | public String toString() 59 | { 60 | return "Tiger2"; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/ish/burst/ms/objects/api/SystemInfo.java: -------------------------------------------------------------------------------- 1 | package ish.burst.ms.objects.api; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | 5 | import java.util.Date; 6 | import java.util.concurrent.TimeUnit; 7 | 8 | /** 9 | * Created by ihartney on 9/6/14. 10 | */ 11 | public class SystemInfo { 12 | 13 | 14 | long uptime; 15 | long timeSinceLastShare; 16 | String name; 17 | 18 | public long getUptime() { 19 | return uptime; 20 | } 21 | 22 | public void setUptime(long uptime) { 23 | this.uptime = uptime; 24 | } 25 | 26 | public long getTimeSinceLastShare() { 27 | return timeSinceLastShare; 28 | } 29 | 30 | public void setTimeSinceLastShare(long timeSinceLastShare) { 31 | this.timeSinceLastShare = timeSinceLastShare; 32 | } 33 | @JsonIgnore 34 | public String getName() { 35 | return name; 36 | } 37 | @JsonIgnore 38 | public void setName(String name) { 39 | this.name = name; 40 | } 41 | 42 | @JsonIgnore 43 | public String getUptimeH(){ 44 | return convertDurationToH(this.uptime); 45 | } 46 | @JsonIgnore 47 | public String getTimeSinceLastShareH(){ 48 | return convertDurationToH(this.timeSinceLastShare); 49 | } 50 | 51 | @JsonIgnore 52 | private String convertDurationToH(long duration){ 53 | 54 | String remainingStr = ""; 55 | long remainingTime = duration; 56 | 57 | int days = (int)TimeUnit.MILLISECONDS.toDays(remainingTime); 58 | remainingStr += (days == 1) ? "1 Day : " : days+" Days : "; 59 | remainingTime -= TimeUnit.DAYS.toMillis(days); 60 | 61 | 62 | int hours = (int)TimeUnit.MILLISECONDS.toHours(remainingTime); 63 | remainingStr += (hours == 1) ? "1 Hour : " : hours+" Hours : "; 64 | remainingTime -= TimeUnit.HOURS.toMillis(hours); 65 | 66 | int minutes = (int)TimeUnit.MILLISECONDS.toMinutes(remainingTime); 67 | remainingStr += (minutes == 1) ? "1 Minute : " : minutes+" Minutes : "; 68 | remainingTime -= TimeUnit.MINUTES.toMillis(minutes); 69 | 70 | 71 | int seconds = (int)TimeUnit.MILLISECONDS.toSeconds(remainingTime); 72 | remainingStr += (seconds == 1) ? "1 Second" : seconds+" Seconds"; 73 | 74 | return remainingStr; 75 | 76 | } 77 | 78 | 79 | 80 | 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Hamsi256.java: -------------------------------------------------------------------------------- 1 | // $Id: Hamsi256.java 206 2010-06-01 18:18:57Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Hamsi-256 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 206 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Hamsi256 extends HamsiSmallCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Hamsi256() 46 | { 47 | super(); 48 | } 49 | 50 | /** @see Digest */ 51 | public int getDigestLength() 52 | { 53 | return 32; 54 | } 55 | 56 | private static final int[] IV = { 57 | 0x76657273, 0x69746569, 0x74204c65, 0x7576656e, 58 | 0x2c204465, 0x70617274, 0x656d656e, 0x7420456c 59 | }; 60 | 61 | /** @see HamsiSmallCore */ 62 | int[] getIV() 63 | { 64 | return IV; 65 | } 66 | 67 | /** @see HamsiSmallCore */ 68 | HamsiSmallCore dup() 69 | { 70 | return new Hamsi256(); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Fugue224.java: -------------------------------------------------------------------------------- 1 | // $Id: Fugue224.java 159 2010-05-01 15:41:17Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Fugue-224 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 159 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Fugue224 extends Fugue2Core { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Fugue224() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for Fugue-224. */ 51 | private static final int[] initVal = { 52 | 0xf4c9120d, 0x6286f757, 0xee39e01c, 0xe074e3cb, 53 | 0xa1127c62, 0x9a43d215, 0xbd8d679a 54 | }; 55 | 56 | /** @see FugueCore */ 57 | int[] getIV() 58 | { 59 | return initVal; 60 | } 61 | 62 | /** @see Digest */ 63 | public int getDigestLength() 64 | { 65 | return 28; 66 | } 67 | 68 | /** @see FugueCore */ 69 | FugueCore dup() 70 | { 71 | return new Fugue224(); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Fugue256.java: -------------------------------------------------------------------------------- 1 | // $Id: Fugue256.java 159 2010-05-01 15:41:17Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Fugue-256 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 159 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Fugue256 extends Fugue2Core { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Fugue256() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for Fugue-256. */ 51 | private static final int[] initVal = { 52 | 0xe952bdde, 0x6671135f, 0xe0d4f668, 0xd2b0b594, 53 | 0xf96c621d, 0xfbf929de, 0x9149e899, 0x34f8c248 54 | }; 55 | 56 | /** @see FugueCore */ 57 | int[] getIV() 58 | { 59 | return initVal; 60 | } 61 | 62 | /** @see Digest */ 63 | public int getDigestLength() 64 | { 65 | return 32; 66 | } 67 | 68 | /** @see FugueCore */ 69 | FugueCore dup() 70 | { 71 | return new Fugue256(); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/BLAKE224.java: -------------------------------------------------------------------------------- 1 | // $Id: BLAKE224.java 252 2011-06-07 17:55:14Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the BLAKE-224 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 252 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class BLAKE224 extends BLAKESmallCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public BLAKE224() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for BLAKE-224. */ 51 | private static final int[] initVal = { 52 | 0xC1059ED8, 0x367CD507, 0x3070DD17, 0xF70E5939, 53 | 0xFFC00B31, 0x68581511, 0x64F98FA7, 0xBEFA4FA4 54 | }; 55 | 56 | /** @see BLAKESmallCore */ 57 | int[] getInitVal() 58 | { 59 | return initVal; 60 | } 61 | 62 | /** @see Digest */ 63 | public int getDigestLength() 64 | { 65 | return 28; 66 | } 67 | 68 | /** @see Digest */ 69 | public Digest copy() 70 | { 71 | return copyState(new BLAKE224()); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/BLAKE256.java: -------------------------------------------------------------------------------- 1 | // $Id: BLAKE256.java 252 2011-06-07 17:55:14Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the BLAKE-256 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 252 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class BLAKE256 extends BLAKESmallCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public BLAKE256() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for BLAKE-256. */ 51 | private static final int[] initVal = { 52 | 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 53 | 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19 54 | }; 55 | 56 | /** @see BLAKESmallCore */ 57 | int[] getInitVal() 58 | { 59 | return initVal; 60 | } 61 | 62 | /** @see Digest */ 63 | public int getDigestLength() 64 | { 65 | return 32; 66 | } 67 | 68 | /** @see Digest */ 69 | public Digest copy() 70 | { 71 | return copyState(new BLAKE256()); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/SHA224.java: -------------------------------------------------------------------------------- 1 | // $Id: SHA224.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the SHA-224 digest algorithm under the 7 | * {@link Digest} API. SHA-224 is specified by FIPS 180-2.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 156 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class SHA224 extends SHA2Core { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public SHA224() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for SHA-224. */ 51 | private static final int[] initVal = { 52 | 0xC1059ED8, 0x367CD507, 0x3070DD17, 0xF70E5939, 53 | 0xFFC00B31, 0x68581511, 0x64F98FA7, 0xBEFA4FA4 54 | }; 55 | 56 | /** @see SHA2Core */ 57 | int[] getInitVal() 58 | { 59 | return initVal; 60 | } 61 | 62 | /** @see Digest */ 63 | public int getDigestLength() 64 | { 65 | return 28; 66 | } 67 | 68 | /** @see Digest */ 69 | public Digest copy() 70 | { 71 | return copyState(new SHA224()); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/SHA256.java: -------------------------------------------------------------------------------- 1 | // $Id: SHA256.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the SHA-256 digest algorithm under the 7 | * {@link Digest} API. SHA-256 is specified by FIPS 180-2.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 156 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class SHA256 extends SHA2Core { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public SHA256() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for SHA-256. */ 51 | private static final int[] initVal = { 52 | 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 53 | 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19 54 | }; 55 | 56 | /** @see SHA2Core */ 57 | int[] getInitVal() 58 | { 59 | return initVal; 60 | } 61 | 62 | /** @see Digest */ 63 | public int getDigestLength() 64 | { 65 | return 32; 66 | } 67 | 68 | /** @see Digest */ 69 | public Digest copy() 70 | { 71 | return copyState(new SHA256()); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Hamsi384.java: -------------------------------------------------------------------------------- 1 | // $Id: Hamsi384.java 206 2010-06-01 18:18:57Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Hamsi-384 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 206 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Hamsi384 extends HamsiBigCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Hamsi384() 46 | { 47 | super(); 48 | } 49 | 50 | /** @see Digest */ 51 | public int getDigestLength() 52 | { 53 | return 48; 54 | } 55 | 56 | private static final int[] IV = { 57 | 0x656b7472, 0x6f746563, 0x686e6965, 0x6b2c2043, 58 | 0x6f6d7075, 0x74657220, 0x53656375, 0x72697479, 59 | 0x20616e64, 0x20496e64, 0x75737472, 0x69616c20, 60 | 0x43727970, 0x746f6772, 0x61706879, 0x2c204b61 61 | }; 62 | 63 | /** @see HamsiBigCore */ 64 | int[] getIV() 65 | { 66 | return IV; 67 | } 68 | 69 | /** @see HamsiBigCore */ 70 | HamsiBigCore dup() 71 | { 72 | return new Hamsi384(); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Hamsi512.java: -------------------------------------------------------------------------------- 1 | // $Id: Hamsi512.java 206 2010-06-01 18:18:57Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Hamsi-512 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 206 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Hamsi512 extends HamsiBigCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Hamsi512() 46 | { 47 | super(); 48 | } 49 | 50 | /** @see Digest */ 51 | public int getDigestLength() 52 | { 53 | return 64; 54 | } 55 | 56 | private static final int[] IV = { 57 | 0x73746565, 0x6c706172, 0x6b204172, 0x656e6265, 58 | 0x72672031, 0x302c2062, 0x75732032, 0x3434362c, 59 | 0x20422d33, 0x30303120, 0x4c657576, 0x656e2d48, 60 | 0x65766572, 0x6c65652c, 0x2042656c, 0x6769756d 61 | }; 62 | 63 | /** @see HamsiBigCore */ 64 | int[] getIV() 65 | { 66 | return IV; 67 | } 68 | 69 | /** @see HamsiBigCore */ 70 | HamsiBigCore dup() 71 | { 72 | return new Hamsi512(); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/BLAKE384.java: -------------------------------------------------------------------------------- 1 | // $Id: BLAKE384.java 252 2011-06-07 17:55:14Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the BLAKE-384 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 252 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class BLAKE384 extends BLAKEBigCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public BLAKE384() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for BLAKE-384. */ 51 | private static final long[] initVal = { 52 | 0xCBBB9D5DC1059ED8L, 0x629A292A367CD507L, 53 | 0x9159015A3070DD17L, 0x152FECD8F70E5939L, 54 | 0x67332667FFC00B31L, 0x8EB44A8768581511L, 55 | 0xDB0C2E0D64F98FA7L, 0x47B5481DBEFA4FA4L 56 | }; 57 | 58 | /** @see BLAKESmallCore */ 59 | long[] getInitVal() 60 | { 61 | return initVal; 62 | } 63 | 64 | /** @see Digest */ 65 | public int getDigestLength() 66 | { 67 | return 48; 68 | } 69 | 70 | /** @see Digest */ 71 | public Digest copy() 72 | { 73 | return copyState(new BLAKE384()); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/BLAKE512.java: -------------------------------------------------------------------------------- 1 | // $Id: BLAKE512.java 252 2011-06-07 17:55:14Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the BLAKE-512 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 252 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class BLAKE512 extends BLAKEBigCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public BLAKE512() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for BLAKE-512. */ 51 | private static final long[] initVal = { 52 | 0x6A09E667F3BCC908L, 0xBB67AE8584CAA73BL, 53 | 0x3C6EF372FE94F82BL, 0xA54FF53A5F1D36F1L, 54 | 0x510E527FADE682D1L, 0x9B05688C2B3E6C1FL, 55 | 0x1F83D9ABFB41BD6BL, 0x5BE0CD19137E2179L 56 | }; 57 | 58 | /** @see BLAKESmallCore */ 59 | long[] getInitVal() 60 | { 61 | return initVal; 62 | } 63 | 64 | /** @see Digest */ 65 | public int getDigestLength() 66 | { 67 | return 64; 68 | } 69 | 70 | /** @see Digest */ 71 | public Digest copy() 72 | { 73 | return copyState(new BLAKE512()); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/SIMD224.java: -------------------------------------------------------------------------------- 1 | // $Id: SIMD224.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the SIMD-224 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 156 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class SIMD224 extends SIMDSmallCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public SIMD224() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for SIMD-224. */ 51 | private static final int[] initVal = { 52 | 0x33586E9F, 0x12FFF033, 0xB2D9F64D, 0x6F8FEA53, 53 | 0xDE943106, 0x2742E439, 0x4FBAB5AC, 0x62B9FF96, 54 | 0x22E7B0AF, 0xC862B3A8, 0x33E00CDC, 0x236B86A6, 55 | 0xF64AE77C, 0xFA373B76, 0x7DC1EE5B, 0x7FB29CE8 56 | }; 57 | 58 | /** @see SIMDSmallCore */ 59 | int[] getInitVal() 60 | { 61 | return initVal; 62 | } 63 | 64 | /** @see Digest */ 65 | public int getDigestLength() 66 | { 67 | return 28; 68 | } 69 | 70 | /** @see Digest */ 71 | public Digest copy() 72 | { 73 | return copyState(new SIMD224()); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/SIMD256.java: -------------------------------------------------------------------------------- 1 | // $Id: SIMD256.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the SIMD-256 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 156 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class SIMD256 extends SIMDSmallCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public SIMD256() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for SIMD-256. */ 51 | private static final int[] initVal = { 52 | 0x4D567983, 0x07190BA9, 0x8474577B, 0x39D726E9, 53 | 0xAAF3D925, 0x3EE20B03, 0xAFD5E751, 0xC96006D3, 54 | 0xC2C2BA14, 0x49B3BCB4, 0xF67CAF46, 0x668626C9, 55 | 0xE2EAA8D2, 0x1FF47833, 0xD0C661A5, 0x55693DE1 56 | }; 57 | 58 | /** @see SIMDSmallCore */ 59 | int[] getInitVal() 60 | { 61 | return initVal; 62 | } 63 | 64 | /** @see Digest */ 65 | public int getDigestLength() 66 | { 67 | return 32; 68 | } 69 | 70 | /** @see Digest */ 71 | public Digest copy() 72 | { 73 | return copyState(new SIMD256()); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/SHA384.java: -------------------------------------------------------------------------------- 1 | // $Id: SHA384.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the SHA-384 digest algorithm under the 7 | * {@link Digest} API. SHA-384 is specified by FIPS 180-2.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 156 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class SHA384 extends SHA2BigCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public SHA384() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for SHA-384. */ 51 | private static final long[] initVal = { 52 | 0xCBBB9D5DC1059ED8L, 0x629A292A367CD507L, 53 | 0x9159015A3070DD17L, 0x152FECD8F70E5939L, 54 | 0x67332667FFC00B31L, 0x8EB44A8768581511L, 55 | 0xDB0C2E0D64F98FA7L, 0x47B5481DBEFA4FA4L 56 | }; 57 | 58 | /** @see SHA2BigCore */ 59 | long[] getInitVal() 60 | { 61 | return initVal; 62 | } 63 | 64 | /** @see Digest */ 65 | public int getDigestLength() 66 | { 67 | return 48; 68 | } 69 | 70 | /** @see Digest */ 71 | public Digest copy() 72 | { 73 | return copyState(new SHA384()); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/SHA512.java: -------------------------------------------------------------------------------- 1 | // $Id: SHA512.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the SHA-512 digest algorithm under the 7 | * {@link Digest} API. SHA-512 is specified by FIPS 180-2.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 156 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class SHA512 extends SHA2BigCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public SHA512() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for SHA-512. */ 51 | private static final long[] initVal = { 52 | 0x6A09E667F3BCC908L, 0xBB67AE8584CAA73BL, 53 | 0x3C6EF372FE94F82BL, 0xA54FF53A5F1D36F1L, 54 | 0x510E527FADE682D1L, 0x9B05688C2B3E6C1FL, 55 | 0x1F83D9ABFB41BD6BL, 0x5BE0CD19137E2179L 56 | }; 57 | 58 | /** @see SHA2BigCore */ 59 | long[] getInitVal() 60 | { 61 | return initVal; 62 | } 63 | 64 | /** @see Digest */ 65 | public int getDigestLength() 66 | { 67 | return 64; 68 | } 69 | 70 | /** @see Digest */ 71 | public Digest copy() 72 | { 73 | return copyState(new SHA512()); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/BMW224.java: -------------------------------------------------------------------------------- 1 | // $Id: BMW224.java 166 2010-05-03 16:44:36Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the BMW-224 ("Blue Midnight Wish") digest 7 | * algorithm under the {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 166 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class BMW224 extends BMWSmallCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public BMW224() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for BMW-224. */ 51 | private static final int[] initVal = { 52 | 0x00010203, 0x04050607, 0x08090A0B, 0x0C0D0E0F, 53 | 0x10111213, 0x14151617, 0x18191A1B, 0x1C1D1E1F, 54 | 0x20212223, 0x24252627, 0x28292A2B, 0x2C2D2E2F, 55 | 0x30313233, 0x34353637, 0x38393A3B, 0x3C3D3E3F 56 | }; 57 | 58 | /** @see BMWSmallCore */ 59 | int[] getInitVal() 60 | { 61 | return initVal; 62 | } 63 | 64 | /** @see Digest */ 65 | public int getDigestLength() 66 | { 67 | return 28; 68 | } 69 | 70 | /** @see Digest */ 71 | public Digest copy() 72 | { 73 | return copyState(new BMW224()); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/BMW256.java: -------------------------------------------------------------------------------- 1 | // $Id: BMW256.java 166 2010-05-03 16:44:36Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the BMW-256 ("Blue Midnight Wish") digest 7 | * algorithm under the {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 166 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class BMW256 extends BMWSmallCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public BMW256() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for BMW-256. */ 51 | private static final int[] initVal = { 52 | 0x40414243, 0x44454647, 0x48494A4B, 0x4C4D4E4F, 53 | 0x50515253, 0x54555657, 0x58595A5B, 0x5C5D5E5F, 54 | 0x60616263, 0x64656667, 0x68696A6B, 0x6C6D6E6F, 55 | 0x70717273, 0x74757677, 0x78797A7B, 0x7C7D7E7F 56 | }; 57 | 58 | /** @see BMWSmallCore */ 59 | int[] getInitVal() 60 | { 61 | return initVal; 62 | } 63 | 64 | /** @see Digest */ 65 | public int getDigestLength() 66 | { 67 | return 32; 68 | } 69 | 70 | /** @see Digest */ 71 | public Digest copy() 72 | { 73 | return copyState(new BMW256()); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/SHAvite224.java: -------------------------------------------------------------------------------- 1 | // $Id: SHAvite224.java 222 2010-06-09 10:47:13Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the SHAvite-224 digest algorithm under the 7 | * {@link Digest} API (in the SHAvite-3 specification, this function 8 | * is known as "SHAvite-3 with a 224-bit output").

9 | * 10 | *
11 |  * ==========================(LICENSE BEGIN)============================
12 |  *
13 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
14 |  * 
15 |  * Permission is hereby granted, free of charge, to any person obtaining
16 |  * a copy of this software and associated documentation files (the
17 |  * "Software"), to deal in the Software without restriction, including
18 |  * without limitation the rights to use, copy, modify, merge, publish,
19 |  * distribute, sublicense, and/or sell copies of the Software, and to
20 |  * permit persons to whom the Software is furnished to do so, subject to
21 |  * the following conditions:
22 |  * 
23 |  * The above copyright notice and this permission notice shall be
24 |  * included in all copies or substantial portions of the Software.
25 |  * 
26 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
30 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
32 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 |  *
34 |  * ===========================(LICENSE END)=============================
35 |  * 
36 | * 37 | * @version $Revision: 222 $ 38 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 39 | */ 40 | 41 | public class SHAvite224 extends SHAviteSmallCore { 42 | 43 | /** 44 | * Create the engine. 45 | */ 46 | public SHAvite224() 47 | { 48 | super(); 49 | } 50 | 51 | /** The initial value for SHAvite-224. */ 52 | private static final int[] initVal = { 53 | 0x6774F31C, 0x990AE210, 0xC87D4274, 0xC9546371, 54 | 0x62B2AEA8, 0x4B5801D8, 0x1B702860, 0x842F3017 55 | }; 56 | 57 | /** @see SHAviteSmallCore */ 58 | int[] getInitVal() 59 | { 60 | return initVal; 61 | } 62 | 63 | /** @see Digest */ 64 | public int getDigestLength() 65 | { 66 | return 28; 67 | } 68 | 69 | /** @see Digest */ 70 | public Digest copy() 71 | { 72 | return copyState(new SHAvite224()); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/SHAvite256.java: -------------------------------------------------------------------------------- 1 | // $Id: SHAvite256.java 222 2010-06-09 10:47:13Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the SHAvite-256 digest algorithm under the 7 | * {@link Digest} API (in the SHAvite-3 specification, this function 8 | * is known as "SHAvite-3 with a 256-bit output").

9 | * 10 | *
11 |  * ==========================(LICENSE BEGIN)============================
12 |  *
13 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
14 |  * 
15 |  * Permission is hereby granted, free of charge, to any person obtaining
16 |  * a copy of this software and associated documentation files (the
17 |  * "Software"), to deal in the Software without restriction, including
18 |  * without limitation the rights to use, copy, modify, merge, publish,
19 |  * distribute, sublicense, and/or sell copies of the Software, and to
20 |  * permit persons to whom the Software is furnished to do so, subject to
21 |  * the following conditions:
22 |  * 
23 |  * The above copyright notice and this permission notice shall be
24 |  * included in all copies or substantial portions of the Software.
25 |  * 
26 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
30 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
32 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 |  *
34 |  * ===========================(LICENSE END)=============================
35 |  * 
36 | * 37 | * @version $Revision: 222 $ 38 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 39 | */ 40 | 41 | public class SHAvite256 extends SHAviteSmallCore { 42 | 43 | /** 44 | * Create the engine. 45 | */ 46 | public SHAvite256() 47 | { 48 | super(); 49 | } 50 | 51 | /** The initial value for SHAvite-256. */ 52 | private static final int[] initVal = { 53 | 0x49BB3E47, 0x2674860D, 0xA8B392AC, 0x021AC4E6, 54 | 0x409283CF, 0x620E5D86, 0x6D929DCB, 0x96CC2A8B 55 | }; 56 | 57 | /** @see SHAviteSmallCore */ 58 | int[] getInitVal() 59 | { 60 | return initVal; 61 | } 62 | 63 | /** @see Digest */ 64 | public int getDigestLength() 65 | { 66 | return 32; 67 | } 68 | 69 | /** @see Digest */ 70 | public Digest copy() 71 | { 72 | return copyState(new SHAvite256()); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/metisMenu/metisMenu.js: -------------------------------------------------------------------------------- 1 | /* 2 | * metismenu - v1.0.3 3 | * Easy menu jQuery plugin for Twitter Bootstrap 3 4 | * https://github.com/onokumus/metisMenu 5 | * 6 | * Made by Osman Nuri Okumuş 7 | * Under MIT License 8 | */ 9 | ;(function ($, window, document, undefined) { 10 | 11 | var pluginName = "metisMenu", 12 | defaults = { 13 | toggle: true 14 | }; 15 | 16 | function Plugin(element, options) { 17 | this.element = element; 18 | this.settings = $.extend({}, defaults, options); 19 | this._defaults = defaults; 20 | this._name = pluginName; 21 | this.init(); 22 | } 23 | 24 | Plugin.prototype = { 25 | init: function () { 26 | 27 | var $this = $(this.element), 28 | $toggle = this.settings.toggle; 29 | 30 | if (this.isIE() <= 9) { 31 | $this.find("li.active").has("ul").children("ul").collapse("show"); 32 | $this.find("li").not(".active").has("ul").children("ul").collapse("hide"); 33 | } else { 34 | $this.find("li.active").has("ul").children("ul").addClass("collapse in"); 35 | $this.find("li").not(".active").has("ul").children("ul").addClass("collapse"); 36 | } 37 | 38 | $this.find("li").has("ul").children("a").on("click", function (e) { 39 | e.preventDefault(); 40 | 41 | $(this).parent("li").toggleClass("active").children("ul").collapse("toggle"); 42 | 43 | if ($toggle) { 44 | $(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide"); 45 | } 46 | }); 47 | }, 48 | 49 | isIE: function() {//https://gist.github.com/padolsey/527683 50 | var undef, 51 | v = 3, 52 | div = document.createElement("div"), 53 | all = div.getElementsByTagName("i"); 54 | 55 | while ( 56 | div.innerHTML = "", 57 | all[0] 58 | ) { 59 | return v > 4 ? v : undef; 60 | } 61 | } 62 | }; 63 | 64 | $.fn[ pluginName ] = function (options) { 65 | return this.each(function () { 66 | if (!$.data(this, "plugin_" + pluginName)) { 67 | $.data(this, "plugin_" + pluginName, new Plugin(this, options)); 68 | } 69 | }); 70 | }; 71 | 72 | })(jQuery, window, document); 73 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/JH224.java: -------------------------------------------------------------------------------- 1 | // $Id: JH224.java 255 2011-06-07 19:50:20Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the JH-224 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 255 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class JH224 extends JHCore { 41 | 42 | private static final long[] IV = { 43 | 0x2dfedd62f99a98acL, 0xae7cacd619d634e7L, 44 | 0xa4831005bc301216L, 0xb86038c6c9661494L, 45 | 0x66d9899f2580706fL, 0xce9ea31b1d9b1adcL, 46 | 0x11e8325f7b366e10L, 0xf994857f02fa06c1L, 47 | 0x1b4f1b5cd8c840b3L, 0x97f6a17f6e738099L, 48 | 0xdcdf93a5adeaa3d3L, 0xa431e8dec9539a68L, 49 | 0x22b4a98aec86a1e4L, 0xd574ac959ce56cf0L, 50 | 0x15960deab5ab2bbfL, 0x9611dcf0dd64ea6eL 51 | }; 52 | 53 | /** 54 | * Create the engine. 55 | */ 56 | public JH224() 57 | { 58 | } 59 | 60 | /** @see Digest */ 61 | public Digest copy() 62 | { 63 | return copyState(new JH224()); 64 | } 65 | 66 | /** @see Digest */ 67 | public int getDigestLength() 68 | { 69 | return 28; 70 | } 71 | 72 | /** @see JHCore */ 73 | long[] getIV() 74 | { 75 | return IV; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/JH256.java: -------------------------------------------------------------------------------- 1 | // $Id: JH256.java 255 2011-06-07 19:50:20Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the JH-256 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 255 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class JH256 extends JHCore { 41 | 42 | private static final long[] IV = { 43 | 0xeb98a3412c20d3ebL, 0x92cdbe7b9cb245c1L, 44 | 0x1c93519160d4c7faL, 0x260082d67e508a03L, 45 | 0xa4239e267726b945L, 0xe0fb1a48d41a9477L, 46 | 0xcdb5ab26026b177aL, 0x56f024420fff2fa8L, 47 | 0x71a396897f2e4d75L, 0x1d144908f77de262L, 48 | 0x277695f776248f94L, 0x87d5b6574780296cL, 49 | 0x5c5e272dac8e0d6cL, 0x518450c657057a0fL, 50 | 0x7be4d367702412eaL, 0x89e3ab13d31cd769L 51 | }; 52 | 53 | /** 54 | * Create the engine. 55 | */ 56 | public JH256() 57 | { 58 | } 59 | 60 | /** @see Digest */ 61 | public Digest copy() 62 | { 63 | return copyState(new JH256()); 64 | } 65 | 66 | /** @see Digest */ 67 | public int getDigestLength() 68 | { 69 | return 32; 70 | } 71 | 72 | /** @see JHCore */ 73 | long[] getIV() 74 | { 75 | return IV; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/JH384.java: -------------------------------------------------------------------------------- 1 | // $Id: JH384.java 255 2011-06-07 19:50:20Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the JH-384 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 255 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class JH384 extends JHCore { 41 | 42 | private static final long[] IV = { 43 | 0x481e3bc6d813398aL, 0x6d3b5e894ade879bL, 44 | 0x63faea68d480ad2eL, 0x332ccb21480f8267L, 45 | 0x98aec84d9082b928L, 0xd455ea3041114249L, 46 | 0x36f555b2924847ecL, 0xc7250a93baf43ce1L, 47 | 0x569b7f8a27db454cL, 0x9efcbd496397af0eL, 48 | 0x589fc27d26aa80cdL, 0x80c08b8c9deb2edaL, 49 | 0x8a7981e8f8d5373aL, 0xf43967adddd17a71L, 50 | 0xa9b4d3bda475d394L, 0x976c3fba9842737fL 51 | }; 52 | 53 | /** 54 | * Create the engine. 55 | */ 56 | public JH384() 57 | { 58 | } 59 | 60 | /** @see Digest */ 61 | public Digest copy() 62 | { 63 | return copyState(new JH384()); 64 | } 65 | 66 | /** @see Digest */ 67 | public int getDigestLength() 68 | { 69 | return 48; 70 | } 71 | 72 | /** @see JHCore */ 73 | long[] getIV() 74 | { 75 | return IV; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/JH512.java: -------------------------------------------------------------------------------- 1 | // $Id: JH512.java 255 2011-06-07 19:50:20Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the JH-512 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 255 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class JH512 extends JHCore { 41 | 42 | private static final long[] IV = { 43 | 0x6fd14b963e00aa17L, 0x636a2e057a15d543L, 44 | 0x8a225e8d0c97ef0bL, 0xe9341259f2b3c361L, 45 | 0x891da0c1536f801eL, 0x2aa9056bea2b6d80L, 46 | 0x588eccdb2075baa6L, 0xa90f3a76baf83bf7L, 47 | 0x0169e60541e34a69L, 0x46b58a8e2e6fe65aL, 48 | 0x1047a7d0c1843c24L, 0x3b6e71b12d5ac199L, 49 | 0xcf57f6ec9db1f856L, 0xa706887c5716b156L, 50 | 0xe3c2fcdfe68517fbL, 0x545a4678cc8cdd4bL 51 | }; 52 | 53 | /** 54 | * Create the engine. 55 | */ 56 | public JH512() 57 | { 58 | } 59 | 60 | /** @see Digest */ 61 | public Digest copy() 62 | { 63 | return copyState(new JH512()); 64 | } 65 | 66 | /** @see Digest */ 67 | public int getDigestLength() 68 | { 69 | return 64; 70 | } 71 | 72 | /** @see JHCore */ 73 | long[] getIV() 74 | { 75 | return IV; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Skein224.java: -------------------------------------------------------------------------------- 1 | // $Id: Skein224.java 253 2011-06-07 18:33:10Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Skein-224 digest algorithm under the 7 | * {@link Digest} API. In the Skein specification, that function is 8 | * called under the full name "Skein-512-224".

9 | * 10 | *
11 |  * ==========================(LICENSE BEGIN)============================
12 |  *
13 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
14 |  * 
15 |  * Permission is hereby granted, free of charge, to any person obtaining
16 |  * a copy of this software and associated documentation files (the
17 |  * "Software"), to deal in the Software without restriction, including
18 |  * without limitation the rights to use, copy, modify, merge, publish,
19 |  * distribute, sublicense, and/or sell copies of the Software, and to
20 |  * permit persons to whom the Software is furnished to do so, subject to
21 |  * the following conditions:
22 |  * 
23 |  * The above copyright notice and this permission notice shall be
24 |  * included in all copies or substantial portions of the Software.
25 |  * 
26 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
30 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
32 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 |  *
34 |  * ===========================(LICENSE END)=============================
35 |  * 
36 | * 37 | * @version $Revision: 253 $ 38 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 39 | */ 40 | 41 | public class Skein224 extends SkeinBigCore { 42 | 43 | /** 44 | * Create the engine. 45 | */ 46 | public Skein224() 47 | { 48 | super(); 49 | } 50 | 51 | /** The initial value for Skein-224. */ 52 | private static final long[] initVal = { 53 | 0xCCD0616248677224L, 0xCBA65CF3A92339EFL, 54 | 0x8CCD69D652FF4B64L, 0x398AED7B3AB890B4L, 55 | 0x0F59D1B1457D2BD0L, 0x6776FE6575D4EB3DL, 56 | 0x99FBC70E997413E9L, 0x9E2CFCCFE1C41EF7L 57 | }; 58 | 59 | /** @see SkeinBigCore */ 60 | long[] getInitVal() 61 | { 62 | return initVal; 63 | } 64 | 65 | /** @see Digest */ 66 | public int getDigestLength() 67 | { 68 | return 28; 69 | } 70 | 71 | /** @see SkeinBigCore */ 72 | SkeinBigCore dup() 73 | { 74 | return new Skein224(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Skein256.java: -------------------------------------------------------------------------------- 1 | // $Id: Skein256.java 253 2011-06-07 18:33:10Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Skein-256 digest algorithm under the 7 | * {@link Digest} API. In the Skein specification, that function is 8 | * called under the full name "Skein-512-256".

9 | * 10 | *
11 |  * ==========================(LICENSE BEGIN)============================
12 |  *
13 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
14 |  * 
15 |  * Permission is hereby granted, free of charge, to any person obtaining
16 |  * a copy of this software and associated documentation files (the
17 |  * "Software"), to deal in the Software without restriction, including
18 |  * without limitation the rights to use, copy, modify, merge, publish,
19 |  * distribute, sublicense, and/or sell copies of the Software, and to
20 |  * permit persons to whom the Software is furnished to do so, subject to
21 |  * the following conditions:
22 |  * 
23 |  * The above copyright notice and this permission notice shall be
24 |  * included in all copies or substantial portions of the Software.
25 |  * 
26 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
30 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
32 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 |  *
34 |  * ===========================(LICENSE END)=============================
35 |  * 
36 | * 37 | * @version $Revision: 253 $ 38 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 39 | */ 40 | 41 | public class Skein256 extends SkeinBigCore { 42 | 43 | /** 44 | * Create the engine. 45 | */ 46 | public Skein256() 47 | { 48 | super(); 49 | } 50 | 51 | /** The initial value for Skein-256. */ 52 | private static final long[] initVal = { 53 | 0xCCD044A12FDB3E13L, 0xE83590301A79A9EBL, 54 | 0x55AEA0614F816E6FL, 0x2A2767A4AE9B94DBL, 55 | 0xEC06025E74DD7683L, 0xE7A436CDC4746251L, 56 | 0xC36FBAF9393AD185L, 0x3EEDBA1833EDFC13L 57 | }; 58 | 59 | /** @see SkeinBigCore */ 60 | long[] getInitVal() 61 | { 62 | return initVal; 63 | } 64 | 65 | /** @see Digest */ 66 | public int getDigestLength() 67 | { 68 | return 32; 69 | } 70 | 71 | /** @see SkeinBigCore */ 72 | SkeinBigCore dup() 73 | { 74 | return new Skein256(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Skein384.java: -------------------------------------------------------------------------------- 1 | // $Id: Skein384.java 253 2011-06-07 18:33:10Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Skein-384 digest algorithm under the 7 | * {@link Digest} API. In the Skein specification, that function is 8 | * called under the full name "Skein-512-384".

9 | * 10 | *
11 |  * ==========================(LICENSE BEGIN)============================
12 |  *
13 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
14 |  * 
15 |  * Permission is hereby granted, free of charge, to any person obtaining
16 |  * a copy of this software and associated documentation files (the
17 |  * "Software"), to deal in the Software without restriction, including
18 |  * without limitation the rights to use, copy, modify, merge, publish,
19 |  * distribute, sublicense, and/or sell copies of the Software, and to
20 |  * permit persons to whom the Software is furnished to do so, subject to
21 |  * the following conditions:
22 |  * 
23 |  * The above copyright notice and this permission notice shall be
24 |  * included in all copies or substantial portions of the Software.
25 |  * 
26 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
30 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
32 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 |  *
34 |  * ===========================(LICENSE END)=============================
35 |  * 
36 | * 37 | * @version $Revision: 253 $ 38 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 39 | */ 40 | 41 | public class Skein384 extends SkeinBigCore { 42 | 43 | /** 44 | * Create the engine. 45 | */ 46 | public Skein384() 47 | { 48 | super(); 49 | } 50 | 51 | /** The initial value for Skein-384. */ 52 | private static final long[] initVal = { 53 | 0xA3F6C6BF3A75EF5FL, 0xB0FEF9CCFD84FAA4L, 54 | 0x9D77DD663D770CFEL, 0xD798CBF3B468FDDAL, 55 | 0x1BC4A6668A0E4465L, 0x7ED7D434E5807407L, 56 | 0x548FC1ACD4EC44D6L, 0x266E17546AA18FF8L 57 | }; 58 | 59 | /** @see SkeinBigCore */ 60 | long[] getInitVal() 61 | { 62 | return initVal; 63 | } 64 | 65 | /** @see Digest */ 66 | public int getDigestLength() 67 | { 68 | return 48; 69 | } 70 | 71 | /** @see SkeinBigCore */ 72 | SkeinBigCore dup() 73 | { 74 | return new Skein384(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Skein512.java: -------------------------------------------------------------------------------- 1 | // $Id: Skein512.java 253 2011-06-07 18:33:10Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Skein-512 digest algorithm under the 7 | * {@link Digest} API. In the Skein specification, that function is 8 | * called under the full name "Skein-512-512".

9 | * 10 | *
11 |  * ==========================(LICENSE BEGIN)============================
12 |  *
13 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
14 |  * 
15 |  * Permission is hereby granted, free of charge, to any person obtaining
16 |  * a copy of this software and associated documentation files (the
17 |  * "Software"), to deal in the Software without restriction, including
18 |  * without limitation the rights to use, copy, modify, merge, publish,
19 |  * distribute, sublicense, and/or sell copies of the Software, and to
20 |  * permit persons to whom the Software is furnished to do so, subject to
21 |  * the following conditions:
22 |  * 
23 |  * The above copyright notice and this permission notice shall be
24 |  * included in all copies or substantial portions of the Software.
25 |  * 
26 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
30 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
32 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 |  *
34 |  * ===========================(LICENSE END)=============================
35 |  * 
36 | * 37 | * @version $Revision: 253 $ 38 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 39 | */ 40 | 41 | public class Skein512 extends SkeinBigCore { 42 | 43 | /** 44 | * Create the engine. 45 | */ 46 | public Skein512() 47 | { 48 | super(); 49 | } 50 | 51 | /** The initial value for Skein-512. */ 52 | private static final long[] initVal = { 53 | 0x4903ADFF749C51CEL, 0x0D95DE399746DF03L, 54 | 0x8FD1934127C79BCEL, 0x9A255629FF352CB1L, 55 | 0x5DB62599DF6CA7B0L, 0xEABE394CA9D5C3F4L, 56 | 0x991112C71A75B523L, 0xAE18A40B660FCC33L 57 | }; 58 | 59 | /** @see SkeinBigCore */ 60 | long[] getInitVal() 61 | { 62 | return initVal; 63 | } 64 | 65 | /** @see Digest */ 66 | public int getDigestLength() 67 | { 68 | return 64; 69 | } 70 | 71 | /** @see SkeinBigCore */ 72 | SkeinBigCore dup() 73 | { 74 | return new Skein512(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/SHAvite384.java: -------------------------------------------------------------------------------- 1 | // $Id: SHAvite384.java 222 2010-06-09 10:47:13Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the SHAvite-384 digest algorithm under the 7 | * {@link Digest} API (in the SHAvite-3 specification, this function 8 | * is known as "SHAvite-3 with a 384-bit output").

9 | * 10 | *
11 |  * ==========================(LICENSE BEGIN)============================
12 |  *
13 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
14 |  * 
15 |  * Permission is hereby granted, free of charge, to any person obtaining
16 |  * a copy of this software and associated documentation files (the
17 |  * "Software"), to deal in the Software without restriction, including
18 |  * without limitation the rights to use, copy, modify, merge, publish,
19 |  * distribute, sublicense, and/or sell copies of the Software, and to
20 |  * permit persons to whom the Software is furnished to do so, subject to
21 |  * the following conditions:
22 |  * 
23 |  * The above copyright notice and this permission notice shall be
24 |  * included in all copies or substantial portions of the Software.
25 |  * 
26 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
30 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
32 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 |  *
34 |  * ===========================(LICENSE END)=============================
35 |  * 
36 | * 37 | * @version $Revision: 222 $ 38 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 39 | */ 40 | 41 | public class SHAvite384 extends SHAviteBigCore { 42 | 43 | /** 44 | * Create the engine. 45 | */ 46 | public SHAvite384() 47 | { 48 | super(); 49 | } 50 | 51 | /** The initial value for SHAvite-384. */ 52 | private static final int[] initVal = { 53 | 0x83DF1545, 0xF9AAEC13, 0xF4803CB0, 0x11FE1F47, 54 | 0xDA6CD269, 0x4F53FCD7, 0x950529A2, 0x97908147, 55 | 0xB0A4D7AF, 0x2B9132BF, 0x226E607D, 0x3C0F8D7C, 56 | 0x487B3F0F, 0x04363E22, 0x0155C99C, 0xEC2E20D3 57 | }; 58 | 59 | /** @see SHAviteBigCore */ 60 | int[] getInitVal() 61 | { 62 | return initVal; 63 | } 64 | 65 | /** @see Digest */ 66 | public int getDigestLength() 67 | { 68 | return 48; 69 | } 70 | 71 | /** @see Digest */ 72 | public Digest copy() 73 | { 74 | return copyState(new SHAvite384()); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/SHAvite512.java: -------------------------------------------------------------------------------- 1 | // $Id: SHAvite512.java 222 2010-06-09 10:47:13Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the SHAvite-512 digest algorithm under the 7 | * {@link Digest} API (in the SHAvite-3 specification, this function 8 | * is known as "SHAvite-3 with a 512-bit output").

9 | * 10 | *
11 |  * ==========================(LICENSE BEGIN)============================
12 |  *
13 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
14 |  * 
15 |  * Permission is hereby granted, free of charge, to any person obtaining
16 |  * a copy of this software and associated documentation files (the
17 |  * "Software"), to deal in the Software without restriction, including
18 |  * without limitation the rights to use, copy, modify, merge, publish,
19 |  * distribute, sublicense, and/or sell copies of the Software, and to
20 |  * permit persons to whom the Software is furnished to do so, subject to
21 |  * the following conditions:
22 |  * 
23 |  * The above copyright notice and this permission notice shall be
24 |  * included in all copies or substantial portions of the Software.
25 |  * 
26 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
30 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
32 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 |  *
34 |  * ===========================(LICENSE END)=============================
35 |  * 
36 | * 37 | * @version $Revision: 222 $ 38 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 39 | */ 40 | 41 | public class SHAvite512 extends SHAviteBigCore { 42 | 43 | /** 44 | * Create the engine. 45 | */ 46 | public SHAvite512() 47 | { 48 | super(); 49 | } 50 | 51 | /** The initial value for SHAvite-512. */ 52 | private static final int[] initVal = { 53 | 0x72FCCDD8, 0x79CA4727, 0x128A077B, 0x40D55AEC, 54 | 0xD1901A06, 0x430AE307, 0xB29F5CD1, 0xDF07FBFC, 55 | 0x8E45D73D, 0x681AB538, 0xBDE86578, 0xDD577E47, 56 | 0xE275EADE, 0x502D9FCD, 0xB9357178, 0x022A4B9A 57 | }; 58 | 59 | /** @see SHAviteBigCore */ 60 | int[] getInitVal() 61 | { 62 | return initVal; 63 | } 64 | 65 | /** @see Digest */ 66 | public int getDigestLength() 67 | { 68 | return 64; 69 | } 70 | 71 | /** @see Digest */ 72 | public Digest copy() 73 | { 74 | return copyState(new SHAvite512()); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/Hamsi224.java: -------------------------------------------------------------------------------- 1 | // $Id: Hamsi224.java 236 2010-06-18 15:41:41Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the Hamsi-224 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 236 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class Hamsi224 extends HamsiSmallCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public Hamsi224() 46 | { 47 | super(); 48 | } 49 | 50 | /** @see Digest */ 51 | public int getDigestLength() 52 | { 53 | return 28; 54 | } 55 | 56 | private static final int[] IV = { 57 | 0xc3967a67, 0xc3bc6c20, 0x4bc3bcc3, 0xa7c3bc6b, 58 | 0x2c204b61, 0x74686f6c, 0x69656b65, 0x20556e69 59 | }; 60 | 61 | /* 62 | * Wrong IV, but compatible with test vectors submitted for 63 | * round 2 of the SHA-3 competition. 64 | private static final int[] IV = { 65 | 0x3c967a67, 0x3cbc6c20, 0xb4c343c3, 0xa73cbc6b, 66 | 0x2c204b61, 0x74686f6c, 0x69656b65, 0x20556e69 67 | }; 68 | */ 69 | 70 | /** @see HamsiSmallCore */ 71 | int[] getIV() 72 | { 73 | return IV; 74 | } 75 | 76 | /** @see HamsiSmallCore */ 77 | HamsiSmallCore dup() 78 | { 79 | return new Hamsi224(); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/BMW384.java: -------------------------------------------------------------------------------- 1 | // $Id: BMW384.java 166 2010-05-03 16:44:36Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the BMW-384 ("Blue Midnight Wish") digest 7 | * algorithm under the {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 166 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class BMW384 extends BMWBigCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public BMW384() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for BMW-384. */ 51 | private static final long[] initVal = { 52 | 0x0001020304050607L, 0x08090A0B0C0D0E0FL, 53 | 0x1011121314151617L, 0x18191A1B1C1D1E1FL, 54 | 0x2021222324252627L, 0x28292A2B2C2D2E2FL, 55 | 0x3031323334353637L, 0x38393A3B3C3D3E3FL, 56 | 0x4041424344454647L, 0x48494A4B4C4D4E4FL, 57 | 0x5051525354555657L, 0x58595A5B5C5D5E5FL, 58 | 0x6061626364656667L, 0x68696A6B6C6D6E6FL, 59 | 0x7071727374757677L, 0x78797A7B7C7D7E7FL 60 | }; 61 | 62 | /** @see BMWSmallCore */ 63 | long[] getInitVal() 64 | { 65 | return initVal; 66 | } 67 | 68 | /** @see Digest */ 69 | public int getDigestLength() 70 | { 71 | return 48; 72 | } 73 | 74 | /** @see Digest */ 75 | public Digest copy() 76 | { 77 | return copyState(new BMW384()); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/BMW512.java: -------------------------------------------------------------------------------- 1 | // $Id: BMW512.java 166 2010-05-03 16:44:36Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the BMW-512 ("Blue Midnight Wish") digest 7 | * algorithm under the {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 166 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class BMW512 extends BMWBigCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public BMW512() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for BMW-512. */ 51 | private static final long[] initVal = { 52 | 0x8081828384858687L, 0x88898A8B8C8D8E8FL, 53 | 0x9091929394959697L, 0x98999A9B9C9D9E9FL, 54 | 0xA0A1A2A3A4A5A6A7L, 0xA8A9AAABACADAEAFL, 55 | 0xB0B1B2B3B4B5B6B7L, 0xB8B9BABBBCBDBEBFL, 56 | 0xC0C1C2C3C4C5C6C7L, 0xC8C9CACBCCCDCECFL, 57 | 0xD0D1D2D3D4D5D6D7L, 0xD8D9DADBDCDDDEDFL, 58 | 0xE0E1E2E3E4E5E6E7L, 0xE8E9EAEBECEDEEEFL, 59 | 0xF0F1F2F3F4F5F6F7L, 0xF8F9FAFBFCFDFEFFL 60 | }; 61 | 62 | /** @see BMWSmallCore */ 63 | long[] getInitVal() 64 | { 65 | return initVal; 66 | } 67 | 68 | /** @see Digest */ 69 | public int getDigestLength() 70 | { 71 | return 64; 72 | } 73 | 74 | /** @see Digest */ 75 | public Digest copy() 76 | { 77 | return copyState(new BMW512()); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/CubeHash224.java: -------------------------------------------------------------------------------- 1 | // $Id: CubeHash224.java 183 2010-05-08 21:34:53Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the CubeHash-224 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 183 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class CubeHash224 extends CubeHashCore { 41 | 42 | private static final int[] IV = { 43 | 0xB0FC8217, 0x1BEE1A90, 0x829E1A22, 44 | 0x6362C342, 0x24D91C30, 0x03A7AA24, 45 | 0xA63721C8, 0x85B0E2EF, 0xF35D13F3, 46 | 0x41DA807D, 0x21A70CA6, 0x1F4E9774, 47 | 0xB3E1C932, 0xEB0A79A8, 0xCDDAAA66, 48 | 0xE2F6ECAA, 0x0A713362, 0xAA3080E0, 49 | 0xD8F23A32, 0xCEF15E28, 0xDB086314, 50 | 0x7F709DF7, 0xACD228A4, 0x704D6ECE, 51 | 0xAA3EC95F, 0xE387C214, 0x3A6445FF, 52 | 0x9CAB81C3, 0xC73D4B98, 0xD277AEBE, 53 | 0xFD20151C, 0x00CB573E 54 | }; 55 | 56 | /** 57 | * Create the engine. 58 | */ 59 | public CubeHash224() 60 | { 61 | } 62 | 63 | /** @see Digest */ 64 | public Digest copy() 65 | { 66 | return copyState(new CubeHash224()); 67 | } 68 | 69 | /** @see Digest */ 70 | public int getDigestLength() 71 | { 72 | return 28; 73 | } 74 | 75 | /** @see CubeHashCore */ 76 | int[] getIV() 77 | { 78 | return IV; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/CubeHash256.java: -------------------------------------------------------------------------------- 1 | // $Id: CubeHash256.java 183 2010-05-08 21:34:53Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the CubeHash-256 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 183 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class CubeHash256 extends CubeHashCore { 41 | 42 | private static final int[] IV = { 43 | 0xEA2BD4B4, 0xCCD6F29F, 0x63117E71, 44 | 0x35481EAE, 0x22512D5B, 0xE5D94E63, 45 | 0x7E624131, 0xF4CC12BE, 0xC2D0B696, 46 | 0x42AF2070, 0xD0720C35, 0x3361DA8C, 47 | 0x28CCECA4, 0x8EF8AD83, 0x4680AC00, 48 | 0x40E5FBAB, 0xD89041C3, 0x6107FBD5, 49 | 0x6C859D41, 0xF0B26679, 0x09392549, 50 | 0x5FA25603, 0x65C892FD, 0x93CB6285, 51 | 0x2AF2B5AE, 0x9E4B4E60, 0x774ABFDD, 52 | 0x85254725, 0x15815AEB, 0x4AB6AAD6, 53 | 0x9CDAF8AF, 0xD6032C0A 54 | }; 55 | 56 | /** 57 | * Create the engine. 58 | */ 59 | public CubeHash256() 60 | { 61 | } 62 | 63 | /** @see Digest */ 64 | public Digest copy() 65 | { 66 | return copyState(new CubeHash256()); 67 | } 68 | 69 | /** @see Digest */ 70 | public int getDigestLength() 71 | { 72 | return 32; 73 | } 74 | 75 | /** @see CubeHashCore */ 76 | int[] getIV() 77 | { 78 | return IV; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/CubeHash384.java: -------------------------------------------------------------------------------- 1 | // $Id: CubeHash384.java 183 2010-05-08 21:34:53Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the CubeHash-384 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 183 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class CubeHash384 extends CubeHashCore { 41 | 42 | private static final int[] IV = { 43 | 0xE623087E, 0x04C00C87, 0x5EF46453, 44 | 0x69524B13, 0x1A05C7A9, 0x3528DF88, 45 | 0x6BDD01B5, 0x5057B792, 0x6AA7A922, 46 | 0x649C7EEE, 0xF426309F, 0xCB629052, 47 | 0xFC8E20ED, 0xB3482BAB, 0xF89E5E7E, 48 | 0xD83D4DE4, 0x44BFC10D, 0x5FC1E63D, 49 | 0x2104E6CB, 0x17958F7F, 0xDBEAEF70, 50 | 0xB4B97E1E, 0x32C195F6, 0x6184A8E4, 51 | 0x796C2543, 0x23DE176D, 0xD33BBAEC, 52 | 0x0C12E5D2, 0x4EB95A7B, 0x2D18BA01, 53 | 0x04EE475F, 0x1FC5F22E 54 | }; 55 | 56 | /** 57 | * Create the engine. 58 | */ 59 | public CubeHash384() 60 | { 61 | } 62 | 63 | /** @see Digest */ 64 | public Digest copy() 65 | { 66 | return copyState(new CubeHash384()); 67 | } 68 | 69 | /** @see Digest */ 70 | public int getDigestLength() 71 | { 72 | return 48; 73 | } 74 | 75 | /** @see CubeHashCore */ 76 | int[] getIV() 77 | { 78 | return IV; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/CubeHash512.java: -------------------------------------------------------------------------------- 1 | // $Id: CubeHash512.java 183 2010-05-08 21:34:53Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the CubeHash-512 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 183 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class CubeHash512 extends CubeHashCore { 41 | 42 | private static final int[] IV = { 43 | 0x2AEA2A61, 0x50F494D4, 0x2D538B8B, 44 | 0x4167D83E, 0x3FEE2313, 0xC701CF8C, 45 | 0xCC39968E, 0x50AC5695, 0x4D42C787, 46 | 0xA647A8B3, 0x97CF0BEF, 0x825B4537, 47 | 0xEEF864D2, 0xF22090C4, 0xD0E5CD33, 48 | 0xA23911AE, 0xFCD398D9, 0x148FE485, 49 | 0x1B017BEF, 0xB6444532, 0x6A536159, 50 | 0x2FF5781C, 0x91FA7934, 0x0DBADEA9, 51 | 0xD65C8A2B, 0xA5A70E75, 0xB1C62456, 52 | 0xBC796576, 0x1921C8F7, 0xE7989AF1, 53 | 0x7795D246, 0xD43E3B44 54 | }; 55 | 56 | /** 57 | * Create the engine. 58 | */ 59 | public CubeHash512() 60 | { 61 | } 62 | 63 | /** @see Digest */ 64 | public Digest copy() 65 | { 66 | return copyState(new CubeHash512()); 67 | } 68 | 69 | /** @see Digest */ 70 | public int getDigestLength() 71 | { 72 | return 64; 73 | } 74 | 75 | /** @see CubeHashCore */ 76 | int[] getIV() 77 | { 78 | return IV; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/SIMD384.java: -------------------------------------------------------------------------------- 1 | // $Id: SIMD384.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the SIMD-384 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 156 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class SIMD384 extends SIMDBigCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public SIMD384() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for SIMD-384. */ 51 | private static final int[] initVal = { 52 | 0x8A36EEBC, 0x94A3BD90, 0xD1537B83, 0xB25B070B, 53 | 0xF463F1B5, 0xB6F81E20, 0x0055C339, 0xB4D144D1, 54 | 0x7360CA61, 0x18361A03, 0x17DCB4B9, 0x3414C45A, 55 | 0xA699A9D2, 0xE39E9664, 0x468BFE77, 0x51D062F8, 56 | 0xB9E3BFE8, 0x63BECE2A, 0x8FE506B9, 0xF8CC4AC2, 57 | 0x7AE11542, 0xB1AADDA1, 0x64B06794, 0x28D2F462, 58 | 0xE64071EC, 0x1DEB91A8, 0x8AC8DB23, 0x3F782AB5, 59 | 0x039B5CB8, 0x71DDD962, 0xFADE2CEA, 0x1416DF71 60 | }; 61 | 62 | /** @see SIMDSmallCore */ 63 | int[] getInitVal() 64 | { 65 | return initVal; 66 | } 67 | 68 | /** @see Digest */ 69 | public int getDigestLength() 70 | { 71 | return 48; 72 | } 73 | 74 | /** @see Digest */ 75 | public Digest copy() 76 | { 77 | return copyState(new SIMD384()); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/fr/cryptohash/SIMD512.java: -------------------------------------------------------------------------------- 1 | // $Id: SIMD512.java 156 2010-04-26 17:55:11Z tp $ 2 | 3 | package fr.cryptohash; 4 | 5 | /** 6 | *

This class implements the SIMD-512 digest algorithm under the 7 | * {@link Digest} API.

8 | * 9 | *
10 |  * ==========================(LICENSE BEGIN)============================
11 |  *
12 |  * Copyright (c) 2007-2010  Projet RNRT SAPHIR
13 |  * 
14 |  * Permission is hereby granted, free of charge, to any person obtaining
15 |  * a copy of this software and associated documentation files (the
16 |  * "Software"), to deal in the Software without restriction, including
17 |  * without limitation the rights to use, copy, modify, merge, publish,
18 |  * distribute, sublicense, and/or sell copies of the Software, and to
19 |  * permit persons to whom the Software is furnished to do so, subject to
20 |  * the following conditions:
21 |  * 
22 |  * The above copyright notice and this permission notice shall be
23 |  * included in all copies or substantial portions of the Software.
24 |  * 
25 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29 |  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30 |  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 |  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |  *
33 |  * ===========================(LICENSE END)=============================
34 |  * 
35 | * 36 | * @version $Revision: 156 $ 37 | * @author Thomas Pornin <thomas.pornin@cryptolog.com> 38 | */ 39 | 40 | public class SIMD512 extends SIMDBigCore { 41 | 42 | /** 43 | * Create the engine. 44 | */ 45 | public SIMD512() 46 | { 47 | super(); 48 | } 49 | 50 | /** The initial value for SIMD-512. */ 51 | private static final int[] initVal = { 52 | 0x0BA16B95, 0x72F999AD, 0x9FECC2AE, 0xBA3264FC, 53 | 0x5E894929, 0x8E9F30E5, 0x2F1DAA37, 0xF0F2C558, 54 | 0xAC506643, 0xA90635A5, 0xE25B878B, 0xAAB7878F, 55 | 0x88817F7A, 0x0A02892B, 0x559A7550, 0x598F657E, 56 | 0x7EEF60A1, 0x6B70E3E8, 0x9C1714D1, 0xB958E2A8, 57 | 0xAB02675E, 0xED1C014F, 0xCD8D65BB, 0xFDB7A257, 58 | 0x09254899, 0xD699C7BC, 0x9019B6DC, 0x2B9022E4, 59 | 0x8FA14956, 0x21BF9BD3, 0xB94D0943, 0x6FFDDC22 60 | }; 61 | 62 | /** @see SIMDSmallCore */ 63 | int[] getInitVal() 64 | { 65 | return initVal; 66 | } 67 | 68 | /** @see Digest */ 69 | public int getDigestLength() 70 | { 71 | return 64; 72 | } 73 | 74 | /** @see Digest */ 75 | public Digest copy() 76 | { 77 | return copyState(new SIMD512()); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/flot/jquery.flot.resize.js: -------------------------------------------------------------------------------- 1 | /* Flot plugin for automatically redrawing plots as the placeholder resizes. 2 | 3 | Copyright (c) 2007-2013 IOLA and Ole Laursen. 4 | Licensed under the MIT license. 5 | 6 | It works by listening for changes on the placeholder div (through the jQuery 7 | resize event plugin) - if the size changes, it will redraw the plot. 8 | 9 | There are no options. If you need to disable the plugin for some plots, you 10 | can just fix the size of their placeholders. 11 | 12 | */ 13 | 14 | /* Inline dependency: 15 | * jQuery resize event - v1.1 - 3/14/2010 16 | * http://benalman.com/projects/jquery-resize-plugin/ 17 | * 18 | * Copyright (c) 2010 "Cowboy" Ben Alman 19 | * Dual licensed under the MIT and GPL licenses. 20 | * http://benalman.com/about/license/ 21 | */ 22 | 23 | (function($,h,c){var a=$([]),e=$.resize=$.extend($.resize,{}),i,k="setTimeout",j="resize",d=j+"-special-event",b="delay",f="throttleWindow";e[b]=250;e[f]=true;$.event.special[j]={setup:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.add(l);$.data(this,d,{w:l.width(),h:l.height()});if(a.length===1){g()}},teardown:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.not(l);l.removeData(d);if(!a.length){clearTimeout(i)}},add:function(l){if(!e[f]&&this[k]){return false}var n;function m(s,o,p){var q=$(this),r=$.data(this,d);r.w=o!==c?o:q.width();r.h=p!==c?p:q.height();n.apply(this,arguments)}if($.isFunction(l)){n=l;return m}else{n=l.handler;l.handler=m}}};function g(){i=h[k](function(){a.each(function(){var n=$(this),m=n.width(),l=n.height(),o=$.data(this,d);if(m!==o.w||l!==o.h){n.trigger(j,[o.w=m,o.h=l])}});g()},e[b])}})(jQuery,this); 24 | 25 | (function ($) { 26 | var options = { }; // no options 27 | 28 | function init(plot) { 29 | function onResize() { 30 | var placeholder = plot.getPlaceholder(); 31 | 32 | // somebody might have hidden us and we can't plot 33 | // when we don't have the dimensions 34 | if (placeholder.width() == 0 || placeholder.height() == 0) 35 | return; 36 | 37 | plot.resize(); 38 | plot.setupGrid(); 39 | plot.draw(); 40 | } 41 | 42 | function bindEvents(plot, eventHolder) { 43 | plot.getPlaceholder().resize(onResize); 44 | } 45 | 46 | function shutdown(plot, eventHolder) { 47 | plot.getPlaceholder().unbind("resize", onResize); 48 | } 49 | 50 | plot.hooks.bindEvents.push(bindEvents); 51 | plot.hooks.shutdown.push(shutdown); 52 | } 53 | 54 | $.plot.plugins.push({ 55 | init: init, 56 | options: options, 57 | name: 'resize', 58 | version: '1.0' 59 | }); 60 | })(jQuery); --------------------------------------------------------------------------------