Skip to content

Commit 0ccac9b

Browse files
author
simonmkwii
committed
Now working fully!
1 parent 9ecc925 commit 0ccac9b

63 files changed

Lines changed: 27054 additions & 319 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NCABuilder/Crypto/AES-CTR.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using System.Collections.Generic;
22
using System.Security.Cryptography;
33

4-
public class Aes128CounterMode : SymmetricAlgorithm
4+
public class AES128CTR : SymmetricAlgorithm
55
{
66
private readonly byte[] Counter;
77

8-
private readonly AesManaged AESCtr; public Aes128CounterMode(byte[] CTR)
8+
private readonly AesManaged AESCtr; public AES128CTR(byte[] CTR)
99
{
1010
AESCtr = new AesManaged
1111
{

NCABuilder/CryptoInitialisers.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ public static byte[] GenSHA256Hash(byte[] Data)
2020
return SHA.ComputeHash(Data);
2121
}
2222

23+
public static byte[] GenSHA256StrmHash(Stream Data)
24+
{
25+
var SHA = SHA256.Create();
26+
return SHA.ComputeHash(Data);
27+
}
28+
2329
// Thanks, Falo!
2430
public static byte[] AES_XTS(byte[] Key1, byte[] Key2, int SectorSize, byte[] Data, ulong Sector)
2531
{
@@ -54,7 +60,7 @@ public static byte[] AES_EBC(byte[] Key, byte[] Data)
5460
public static byte[] AES_CTR(byte[] Key, byte[] CTR, byte[] Data)
5561
{
5662
byte[] Buffer = new byte[Data.Length];
57-
var AESCTR = new Aes128CounterMode(CTR);
63+
var AESCTR = new AES128CTR(CTR);
5864
ICryptoTransform Transform;
5965
Transform = AESCTR.CreateEncryptor(Key, null);
6066
Transform.TransformBlock(Data, 0, Data.Length, Buffer, 0);

NCABuilder/Frontend.Designer.cs

Lines changed: 96 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)