Skip to content

Commit

Permalink
Remove C++/WinRT dependency for NanaZip.Codecs.
Browse files Browse the repository at this point in the history
  • Loading branch information
MouriNaruto committed Sep 6, 2024
1 parent b9491ac commit 8b91f6c
Show file tree
Hide file tree
Showing 39 changed files with 78 additions and 161 deletions.
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Aich.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <aich.h>

namespace NanaZip::Codecs::Hash
{
struct Aich : public winrt::implements<Aich, IHasher>
struct Aich : public Mile::ComObject<Aich, IHasher>
{
private:

Expand Down Expand Up @@ -67,6 +65,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateAich()
{
return winrt::make<Aich>().detach();
return new Aich();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Blake2b.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <blake2b.h>

namespace NanaZip::Codecs::Hash
{
struct Blake2b : public winrt::implements<Blake2b, IHasher>
struct Blake2b : public Mile::ComObject<Blake2b, IHasher>
{
private:

Expand Down Expand Up @@ -61,6 +59,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateBlake2b()
{
return winrt::make<Blake2b>().detach();
return new Blake2b();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Blake3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <blake3.h>

namespace NanaZip::Codecs::Hash
{
struct Blake3 : public winrt::implements<Blake3, IHasher>
struct Blake3 : public Mile::ComObject<Blake3, IHasher>
{
private:

Expand Down Expand Up @@ -62,6 +60,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateBlake3()
{
return winrt::make<Blake3>().detach();
return new Blake3();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Ed2k.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <ed2k.h>

namespace NanaZip::Codecs::Hash
{
struct Ed2k : public winrt::implements<Ed2k, IHasher>
struct Ed2k : public Mile::ComObject<Ed2k, IHasher>
{
private:

Expand Down Expand Up @@ -61,6 +59,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateEd2k()
{
return winrt::make<Ed2k>().detach();
return new Ed2k();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.EdonR224.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <edonr.h>

namespace NanaZip::Codecs::Hash
{
struct EdonR224 : public winrt::implements<EdonR224, IHasher>
struct EdonR224 : public Mile::ComObject<EdonR224, IHasher>
{
private:

Expand Down Expand Up @@ -61,6 +59,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateEdonR224()
{
return winrt::make<EdonR224>().detach();
return new EdonR224();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.EdonR256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <edonr.h>

namespace NanaZip::Codecs::Hash
{
struct EdonR256 : public winrt::implements<EdonR256, IHasher>
struct EdonR256 : public Mile::ComObject<EdonR256, IHasher>
{
private:

Expand Down Expand Up @@ -61,6 +59,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateEdonR256()
{
return winrt::make<EdonR256>().detach();
return new EdonR256();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.EdonR384.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <edonr.h>

namespace NanaZip::Codecs::Hash
{
struct EdonR384 : public winrt::implements<EdonR384, IHasher>
struct EdonR384 : public Mile::ComObject<EdonR384, IHasher>
{
private:

Expand Down Expand Up @@ -61,6 +59,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateEdonR384()
{
return winrt::make<EdonR384>().detach();
return new EdonR384();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.EdonR512.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <edonr.h>

namespace NanaZip::Codecs::Hash
{
struct EdonR512 : public winrt::implements<EdonR512, IHasher>
struct EdonR512 : public Mile::ComObject<EdonR512, IHasher>
{
private:

Expand Down Expand Up @@ -61,6 +59,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateEdonR512()
{
return winrt::make<EdonR512>().detach();
return new EdonR512();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Gost12256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <gost12.h>

namespace NanaZip::Codecs::Hash
{
struct Gost12256 : public winrt::implements<Gost12256, IHasher>
struct Gost12256 : public Mile::ComObject<Gost12256, IHasher>
{
private:

Expand Down Expand Up @@ -61,6 +59,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateGost12256()
{
return winrt::make<Gost12256>().detach();
return new Gost12256();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Gost12512.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <gost12.h>

namespace NanaZip::Codecs::Hash
{
struct Gost12512 : public winrt::implements<Gost12512, IHasher>
struct Gost12512 : public Mile::ComObject<Gost12512, IHasher>
{
private:

Expand Down Expand Up @@ -61,6 +59,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateGost12512()
{
return winrt::make<Gost12512>().detach();
return new Gost12512();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Gost94.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <gost94.h>

namespace NanaZip::Codecs::Hash
{
struct Gost94 : public winrt::implements<Gost94, IHasher>
struct Gost94 : public Mile::ComObject<Gost94, IHasher>
{
private:

Expand Down Expand Up @@ -61,6 +59,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateGost94()
{
return winrt::make<Gost94>().detach();
return new Gost94();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Gost94CryptoPro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <gost94.h>

namespace NanaZip::Codecs::Hash
{
struct Gost94CryptoPro : public winrt::implements<Gost94CryptoPro, IHasher>
struct Gost94CryptoPro : public Mile::ComObject<Gost94CryptoPro, IHasher>
{
private:

Expand Down Expand Up @@ -61,6 +59,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateGost94CryptoPro()
{
return winrt::make<Gost94CryptoPro>().detach();
return new Gost94CryptoPro();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Has160.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <has160.h>

namespace NanaZip::Codecs::Hash
{
struct Has160 : public winrt::implements<Has160, IHasher>
struct Has160 : public Mile::ComObject<Has160, IHasher>
{
private:

Expand Down Expand Up @@ -61,6 +59,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateHas160()
{
return winrt::make<Has160>().detach();
return new Has160();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Md2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

EXTERN_C_START
#include <md2.h>
EXTERN_C_END

namespace NanaZip::Codecs::Hash
{
struct Md2 : public winrt::implements<Md2, IHasher>
struct Md2 : public Mile::ComObject<Md2, IHasher>
{
private:

Expand Down Expand Up @@ -63,6 +61,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateMd2()
{
return winrt::make<Md2>().detach();
return new Md2();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Md4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <md4.h>

namespace NanaZip::Codecs::Hash
{
struct Md4 : public winrt::implements<Md4, IHasher>
struct Md4 : public Mile::ComObject<Md4, IHasher>
{
private:

Expand Down Expand Up @@ -61,6 +59,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateMd4()
{
return winrt::make<Md4>().detach();
return new Md4();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Md5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <md5.h>

namespace NanaZip::Codecs::Hash
{
struct Md5 : public winrt::implements<Md5, IHasher>
struct Md5 : public Mile::ComObject<Md5, IHasher>
{
private:

Expand Down Expand Up @@ -61,6 +59,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateMd5()
{
return winrt::make<Md5>().detach();
return new Md5();
}
}
6 changes: 2 additions & 4 deletions NanaZip.Codecs/NanaZip.Codecs.Hash.Ripemd160.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

#include "NanaZip.Codecs.h"

#include <winrt/Windows.Foundation.h>

#include <ripemd-160.h>

namespace NanaZip::Codecs::Hash
{
struct Ripemd160 : public winrt::implements<Ripemd160, IHasher>
struct Ripemd160 : public Mile::ComObject<Ripemd160, IHasher>
{
private:

Expand Down Expand Up @@ -61,6 +59,6 @@ namespace NanaZip::Codecs::Hash

IHasher* CreateRipemd160()
{
return winrt::make<Ripemd160>().detach();
return new Ripemd160();
}
}
Loading

0 comments on commit 8b91f6c

Please sign in to comment.