Skip to content

Commit 74ddb37

Browse files
committed
Add Travis and AppVeyor CI
- Don't build dnx46 anymore - Reference System.Runtime v4.0.21-beta-* explicitly
1 parent 638920d commit 74ddb37

File tree

8 files changed

+108
-9
lines changed

8 files changed

+108
-9
lines changed

.travis.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: csharp
2+
sudo: false
3+
mono:
4+
- beta
5+
os:
6+
- linux
7+
- osx
8+
before_script:
9+
- chmod ugo+x ./build.sh
10+
script:
11+
- ./build.sh verify

NuGet.Config

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4-
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
4+
<clear />
5+
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetvnext/api/v2" />
56
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
67
</packageSources>
78
</configuration>

README.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
# CryptoHelper
22
:key: Cryptography helper methods for hashing passwords using a PBKDF2 implementation.
33

4+
<hr>
5+
6+
| Windows | Linux | OS X |
7+
| --- | --- | --- |
8+
| [![Build status](https://ci.appveyor.com/api/projects/status/hai0kndijmx6xb9d?svg=true)](https://ci.appveyor.com/project/henkmollema/cryptohelper) | [![Build Status](https://travis-ci.org/henkmollema/CryptoHelper.svg)](https://travis-ci.org/henkmollema/CryptoHelper) | [![Build Status](https://travis-ci.org/henkmollema/CryptoHelper.svg)](https://travis-ci.org/henkmollema/CryptoHelper) |
9+
10+
<hr>
11+
412
This utility ports the password hashing functionality from the [`System.Web.Helpers.Crypto`](http://aspnetwebstack.codeplex.com/SourceControl/latest#src/System.Web.Helpers/Crypto.cs) class to DNX. On DNX the new ASP.NET Data Protection stack is used. Where as classic .NET 4.0 and 4.5 applications will use `Rfc2898DeriveBytes`
513

6-
### [**Download CryptoHelper using NuGet**](https://www.nuget.org/packages/CryptoHelper)
14+
<hr>
15+
16+
#### [Download CryptoHelper on NuGet](https://www.nuget.org/packages/CryptoHelper)
17+
18+
<hr>
719

8-
##### Download from the NuGet Package Manager Console:
20+
#### Download using the NuGet Package Manager Console:
921
```
1022
Install-Package CryptoHelper
1123
```

appveyor.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
init:
2+
- git config --global core.autocrlf true
3+
build_script:
4+
- build.cmd --quiet --parallel verify
5+
clone_depth: 1
6+
test: off
7+
deploy: off

build.cmd

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
@echo off
2+
cd %~dp0
3+
4+
SETLOCAL
5+
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
6+
REM echo Set DNX feed to NuGet v3 (stable)
7+
REM SET DNX_FEED=https://api.nuget.org/v3/index.json
8+
9+
IF EXIST %CACHED_NUGET% goto copynuget
10+
echo Downloading latest version of NuGet.exe...
11+
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
12+
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/latest/nuget.exe' -OutFile '%CACHED_NUGET%'"
13+
14+
:copynuget
15+
IF EXIST .nuget\nuget.exe goto restore
16+
md .nuget
17+
copy %CACHED_NUGET% .nuget\nuget.exe > nul
18+
19+
:restore
20+
IF EXIST packages\Sake goto getdnx
21+
.nuget\nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
22+
.nuget\NuGet.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -o packages
23+
24+
:getdnx
25+
CALL packages\KoreBuild\build\dnvm upgrade -runtime CoreCLR -arch x86 -alias default
26+
CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x86
27+
28+
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

build.sh

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
3+
if test `uname` = Darwin; then
4+
cachedir=~/Library/Caches/KBuild
5+
else
6+
if [ -z $XDG_DATA_HOME ]; then
7+
cachedir=$HOME/.local/share
8+
else
9+
cachedir=$XDG_DATA_HOME;
10+
fi
11+
fi
12+
13+
mkdir -p $cachedir
14+
cachePath=$cachedir/nuget.latest.exe
15+
url=https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
16+
if test ! -f $cachePath; then
17+
wget -O $cachePath $url 2>/dev/null || curl -o $cachePath --location $url /dev/null
18+
fi
19+
20+
if test ! -e .nuget; then
21+
mkdir .nuget
22+
cp $cachePath .nuget/nuget.exe
23+
fi
24+
25+
if test ! -d packages/Sake; then
26+
mono .nuget/nuget.exe install KoreBuild -Source https://www.myget.org/F/aspnetvnext/ -ExcludeVersion -o packages -nocache -pre
27+
mono .nuget/nuget.exe install Sake -Source https://www.nuget.org/api/v2/ -o packages -ExcludeVersion
28+
fi
29+
30+
if ! type dnvm > /dev/null 2>&1; then
31+
source packages/KoreBuild/build/dnvm.sh
32+
fi
33+
34+
if ! type dnx > /dev/null 2>&1; then
35+
dnvm install latest -runtime coreclr -alias default
36+
dnvm install default -runtime mono -alias default
37+
fi
38+
39+
mono packages/Sake/tools/Sake.exe -I packages/KoreBuild/build -f makefile.shade "$@"

makefile.shade

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
var VERSION='1.0.0'
2+
var FULL_VERSION='1.0.0'
3+
var AUTHORS='henkmollema'
4+
5+
use-standard-lifecycle
6+
k-standard-goals

src/CryptoHelper/project.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,11 @@
2323
}
2424
},
2525

26-
"dnx46": {
27-
"dependencies": {
28-
"Microsoft.AspNet.Cryptography.KeyDerivation": "1.0.0-*"
29-
}
30-
},
31-
3226
"dnxcore50": {
3327
"dependencies": {
3428
"Microsoft.AspNet.Cryptography.KeyDerivation": "1.0.0-*",
3529
"Microsoft.CSharp": "4.0.1-beta-*",
30+
"System.Runtime": "4.0.21-beta-*",
3631
"System.Security.Cryptography.Algorithms": "4.0.0-beta-*"
3732
}
3833
}

0 commit comments

Comments
 (0)