OSDN Git Service

na-get,なんとなくSHA512対応
authorttp <ttp@users.sourceforge.jp>
Sun, 23 Nov 2008 05:46:07 +0000 (05:46 +0000)
committerttp <ttp@users.sourceforge.jp>
Sun, 23 Nov 2008 05:46:07 +0000 (05:46 +0000)
git-svn-id: http://localhost/svn/AppliStation/trunk@993 34ed2c89-c49f-4a4b-abdb-c318350108cf

na-get-lib/NaGet.Packages/HashValue.cs

index 498d274..fd0bc14 100644 (file)
@@ -21,6 +21,8 @@ namespace NaGet.Packages
                SHA1SUM,\r
                [XmlEnum(Name="sha256")]\r
                SHA256SUM,\r
+               [XmlEnum(Name="sha512")]\r
+               SHA512SUM,\r
        }\r
        \r
        public class HashValue\r
@@ -89,6 +91,9 @@ namespace NaGet.Packages
                                case HashValueType.SHA256SUM:\r
                                        hash = SHA256.Create().ComputeHash(stream);\r
                                        break;\r
+                               case HashValueType.SHA512SUM:\r
+                                       hash = SHA512.Create().ComputeHash(stream);\r
+                                       break;\r
                                default:\r
                                        throw new NotSupportedException(string.Format("Hash type {0} does not supported", type));\r
                        }\r